-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(alert): use correct heading structure for subHeader when header exists #29964
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issue number: resolves #29773 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Certain Chrome and Edge versions (confirmed: Chrome v127 and Edge v127) would indicate that the backdrop has an accessibility violation: ``` Blocked aria-hidden on a <ion-backdrop> element because the element that just received focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at ``` The error is happening because `tabindex` and `aria-hidden` are being passed to `ion-backdrop`. The `tabindex` attribute is used to make an element focusable, regardless of value. When `aria-hidden` is applied to an element, then the element is hidden from screen readers. This violates the accessibility standards since `ion-backdrop` would be considered a focusable element but not visible to screen readers. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Removed `tabindex`, this aligns with frameworks known for accessibility (Chakra UI) ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: `8.3.4-dev.11729533091.1ac77a0c` How to test: 1. Use either Chrome v127 or Edge v127 2. Navigate to the [alert basic page](https://ionic-framework-3pvgcj4b9-ionic1.vercel.app/src/components/alert/test/basic) from the `main` branch 3. Open browser console 4. Click on the first button on the alert page 5. Click on the backdrop 6. Notice the error message in the browser console (if you don't see it, then use a private browser or clear cache) 7. Navigate to the [alert basic page](https://ionic-framework-git-rou-11175-ionic1.vercel.app/src/components/alert/test/basic) from the `ROU-11175` branch 8. Repeat steps 2-6 9. Verify that the error does not appear
…-group (#29870) Issue number: resolves #29826 --------- ## What is the current behavior? When using `compareWith` on `ion-radio-group` in Ionic Angular Standalone the following error is thrown: ``` NG8002: Can't bind to 'compareWith' since it isn't a known property of 'ion-radio-group'. ``` ## What is the new behavior? - `compareWith` on `ion-radio-group` in Angular Standalone is available ## Does this introduce a breaking change? - [ ] Yes - [x] No
resolves #28201 This PR fixes the navigation issue related to `router.go` that was identified in issue #28201. After working on this issue I realised that @xxllxhdj has already created a PR for this in #29847. While their fix is great, I have added tests to replicate the issue, reused existing code and `undefined` will be returned in unexpected situations - which matches the existing functionality. ## What is the current behavior? If a user navigates from `/home` -> `/pageA` -> `/pageB` -> `/pageC` -> back to `/pageB` -> then `router.go(-2)` is called the URL will be updated to `/home` correctly, but the app will try to render `/pageA`. This happens for any delta < -1. ## What is the new behavior? The app will correctly render `/pageA`, which matches the URL. ## Does this introduce a breaking change? - [ ] Yes - [X] No --------- Co-authored-by: xxllxhdj <12881488+xxllxhdj@users.noreply.github.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
brandyscarney
requested review from
JoaoFerreira-FrontEnd,
thetaPC and
tanner-reits
and removed request for
JoaoFerreira-FrontEnd
October 23, 2024 22:05
thetaPC
approved these changes
Oct 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
github-actions
bot
added
package: angular
@ionic/angular package
package: vue
@ionic/vue package
labels
Oct 24, 2024
github-actions
bot
removed
package: angular
@ionic/angular package
package: vue
@ionic/vue package
labels
Oct 24, 2024
tanner-reits
approved these changes
Oct 24, 2024
*/ | ||
const ariaLabelledBy = header ? hdrId : subHeader ? subHdrId : null; | ||
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chained ternary expressions like this are so gross 🤮
tanner-reits
pushed a commit
that referenced
this pull request
Nov 4, 2024
…xists (#29964) - The `header` will continue to always render as an `<h2>` element. - If there is no `header` defined, the `subHeader` will continue to render as an `<h2>` element. - If there is a `header` defined, the `subHeader` will render as an `<h3>` element. - Updates `ariaLabelledBy` to include both `header` and `subHeader` ids when both are defined. - Updates the `a11y` e2e test to use new values & check for tag names.
tanner-reits
pushed a commit
that referenced
this pull request
Nov 4, 2024
…xists (#29964) - The `header` will continue to always render as an `<h2>` element. - If there is no `header` defined, the `subHeader` will continue to render as an `<h2>` element. - If there is a `header` defined, the `subHeader` will render as an `<h3>` element. - Updates `ariaLabelledBy` to include both `header` and `subHeader` ids when both are defined. - Updates the `a11y` e2e test to use new values & check for tag names.
tanner-reits
pushed a commit
that referenced
this pull request
Nov 4, 2024
…xists (#29964) - The `header` will continue to always render as an `<h2>` element. - If there is no `header` defined, the `subHeader` will continue to render as an `<h2>` element. - If there is a `header` defined, the `subHeader` will render as an `<h3>` element. - Updates `ariaLabelledBy` to include both `header` and `subHeader` ids when both are defined. - Updates the `a11y` e2e test to use new values & check for tag names.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: internal
What is the current behavior?
Both the
header
andsubHeader
in an Alert render as an<h2>
element.What is the new behavior?
header
will always render as an<h2>
element.header
defined, thesubHeader
will render as an<h2>
element.header
defined, thesubHeader
will render as an<h3>
element.ariaLabelledBy
to include bothheader
andsubHeader
ids when both are defined.a11y
e2e test to use new values & check for tag names.Does this introduce a breaking change?
Other information
Preview