-
Notifications
You must be signed in to change notification settings - Fork 101
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
(WIP) Fix description text not read on hover by NVDA #1863
base: master
Are you sure you want to change the base?
Conversation
…not read on hover with NVDA use a span with ARIA tags instead of fieldset INSTUI-4444
|
ref={this.handleRef} | ||
> | ||
{this.elementType === 'fieldset' && this.renderLegend()} |
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.
The old solution used here a fieldset
element. SR only reads its <legend>
if its the first element. But we use a Grid
, so the old solution was to add a <legend>
as ScreenReaderContent
and use aria-hidden
on the visible label.
The new solution uses aria-labelledby
instead, so there is just one, visible DOM element for the label
@@ -148,6 +148,7 @@ class CheckboxGroup extends Component<CheckboxGroupProps, CheckboxGroupState> { | |||
vAlign="top" | |||
messagesId={this._messagesId} | |||
elementRef={this.handleRef} | |||
role="group" |
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.
This makes SRs read the same as the fieldset
previously
The issue was that NVDA hover mode was not reading form labels because they were set to
aria-hidden
.This solution uses
aria-labelledby
instead, see e.g. https://dequeuniversity.com/library/aria/radio-and-radio-group . Also it no longer reads messages in the beginning, this was not neededTo test:
Check the examples of CheckboxGroup, FormField, RadioInputGroup with NVDA, JAWS, VoiceOver.
NVDA should read the label on hover. Form groups should be announced
There should be no visual change.
Closes: INSTUI-4444