-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix(overlay and picker): remove aria-hidden attribute #30563
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
Open
joselrio
wants to merge
19
commits into
main
Choose a base branch
from
ROU-11368-to-main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
…dex="-1" This is needed in order to prevent A11Y issues, in order to prevent to be possible to navigate through each option item through tab navigation, structure must change into this.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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: resolves #
What is the current behavior?
aria-hidden="true"
attributes both on overlay and picker components was causing some console error/warnings messages.What is the new behavior?
There is no need of making usage of this attribute due the facts:
display: none;
through the selector:host(.overlay-hidden)
, which by itself will disable overlay content for the screen readers.Removed overlay tests since they were basically checking about
aria-hidden
attribute.Updated PickerColumn and PickerColumnOption structure in order to fit the a11y needs.
Added a focus management system to better drive users when making usage of keyboard navigation inside picker.
Skip A11Y test validation when reported violation is color contrast related.
tabIndex="-1"
andaria-hidden="true"
- Which turns into an A11Y violation when it gets focused.It happens that it gets focused dynamically in order to open the native numeric keyboard once user selects highlighted picker values zone, in order to allow users to insert numeric values through the keyboard.
If this
aria-hidden
andtabindex
are removed/updated, the existing functionality will be lost since ScreenReaders will start to ignore the updated value through the PickerChange and will be focused onto the focused input.This mentioned input has an onChange event that's used to update the
aria-valuetext
on eachpicker-column
which is being capture by the ScreenReader.That said, this new devTools reported issue/warning is a false positive since A11Y behaviour is being covered through a different perspective.
Does this introduce a breaking change?
Testing:
✅ ActionSheet
https://ionic-framework-git-rou-11368-ionic1.vercel.app/src/components/action-sheet/test/a11y
✅ Alert
https://ionic-framework-git-rou-11368-ionic1.vercel.app/src/components/alert/test/a11y
✅ DateTime
https://ionic-framework-git-rou-11368-ionic1.vercel.app/src/components/datetime/test/basic
https://ionic-framework-git-rou-11368-ionic1.vercel.app/src/components/datetime-button/test/basic
✅ Modal
https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/modal/test/a11y
✅ Popover
https://ionic-framework-git-rou-11368-ionic1.vercel.app/src/components/popover/test/basic
✅ Select
https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/select/test/basic
✅ Picker, PickerColumn and PickerColumnOption
https://ionic-framework-git-rou-11368-ionic1.vercel.app/src/components/picker/test/basic
✅ Toast
https://ionic-framework-git-rou-11368-ionic1.vercel.app/src/components/toast/test/a11y
Note: