-
Notifications
You must be signed in to change notification settings - Fork 87
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
[WNMGDS-2712] Update deprecated aria #3051
Conversation
For WNMGDS-2769 A11y QA, I've added my findings for the components updated as part of WNMGDS-2712.
|
This appears to be additional markup aria-react adds to the options in the component. Unfortunately, I don't have control over how We have a component called Because the code I changed impacts only those two examples, it seems the NVDA and JAWS issues are unrelated to my changes. I'll make a follow-up ticket to address them (and investigate if it's possible to modify the aria-react library to remove the redundant attr). |
No changes were made to the checkbox implementation of Choice/ChoiceList because a suitable Setting |
For radio Choice/ChoiceList, I've added It's worth noting, the logic I added will result in checkbox fieldsets having the implicit role of "group," which is no change to how it functions today. So the only thing changing for Choice/ChoiceList is a slight improvement for radio types. |
For Drawer, I moved the I also updated some of the semantic markup used within:
Since my changes didn't indicate anything had changed, it's probably safe to assume they're good to merge. |
No changes were made to Dropdown (aside from adding a code comment). I tested re-implementing This is another side effect of using the react-aria library, and library authors appear to be aware of it. Since this has code comments around it, I'm not going to make a follow-up ticket to investigate. Looks like we've already investigated things. |
Because MonthPicker is just a more extreme version of checkbox ChoiceList, I didn't implement any changes (due to the same Making a follow-up ticket to address the abbreviated month names for NVDA. Will need a11y testing when this one's complete since we don't have NVDA screen readers. |
<div | ||
className="ds-c-dialog__window" | ||
role="document" | ||
ref={containerRef} | ||
tabIndex={-1} | ||
aria-labelledby={headingId} | ||
> | ||
<header className={headerClassNames}> | ||
<div className="ds-c-dialog__window" ref={containerRef} tabIndex={-1}> | ||
<div className={headerClassNames}> |
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.
I just know the original design was tested by accessibility specialists with a variety of screen readers, so will this be tested again by the accessibility team before merging?
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.
@TiffanyPender would it be possible to get another review of the Dialog changes in this PR?
The changes made to this component are:
- Moving
aria-labelledby
to the<dialog>
element - Replacing the
<header>
and<main>
tags with<div>
<header>
and<main>
didn't have accessible names- Including
<main>
seemed to fly against the rule of only 1<main>
element / page
- Removing
role="document"
from an internal<div>
These changes would align Dialog with Drawer markup (Drawer does not use these elements) and I have a sneaking suspicion the original Dialog markup was written well before the release of <dialog>
, so attributes like role="document"
are unnecessary.
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.
@pwolfert I got feedback from Tiffany with feedback for Dialog.
Changes introduced:
- Moved focus to
<dialog>
element (where thearia-labelledby
can label the contents of the dialog) - Added the option to hide aria content for CloseButton
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.
Dialog sounds good in VoiceOver 🎉
WNMGDS-2712
Made assorted ARIA tweaks. ARIA has deprecated some of its attrs on certain roles, so we needed to update those roles to better work with ARIA. More context is available in #2978.
Demo url