-
Notifications
You must be signed in to change notification settings - Fork 88
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
Links embedded in a fieldset > legend not reading correctly with JAWS + IE11 #529
Comments
@eppixdev Yes, moving the Recommend testing this solution with several pairings:
<form>
<legend id="unique-legend-id">Your legend text</legend>
<div>
<a href="#">Trigger to open the help drawer</a>
</div>
<div>
<input
aria-labelledby="unique-legend-id unique-label-id-1"
id="checkbox-1"
name="option-1"
type="checkbox"
/>
<label for="checkbox-1" id="unique-label-id-1">Checkbox one label</label>
...
</div>
</form> |
Tracked here: https://jira.cms.gov/browse/WNMGDS-281 |
One possible issue with moving the link outside of the legend is that the "hint" text is supposed to come before the error message, which is inside the legend. I assume it's not possible to move the error message outside of the legend right? @1Copenut @davidakennedy @melwoodard |
I'm wondering what it would look like to separate out the legend from the I see the value and reason to have a fieldset and legend on components like checkboxes or radios but think the hint text should render outside of the legend in those instances as @1Copenut and @eppixdev pointed out. Maybe we should create |
I'd be all for that. We should approach this deliberately and ensure good test coverage. Our whole form system uses |
I'd be nice to get a cross-section of |
I agree with what @line47 mentions here. And would be happy to test things out. I wonder if it's smarter to make a fieldset component, and pair that with the legend? |
@davidakennedy are you ok with removing hint text and error messages from the legend? This would prevent the need to add new props or any other technical solutions. So it would look like this:
|
And as far as the splitting In that case, I dont think there's a whole lot of benefit for separating out
So I wonder instead of separating the component, which would be a larger breaking change, we could instead remove the default value for the |
I think for fixing this issue moving the hint and error outside of the legend would fix the issue. |
@bernardwang Yeah, I think it's fine. Long term, as @line47 says, I'd like to see us create a fielset component. Also, related to this, an error summary component. Like this. Maybe by taking some of the pressure off other components to handle error messages, they become more versatile and usable. |
Describe the bug
When passing in a link to
hint
as a prop inChoiceList
,TextField
, orFormLabel
(maybe some others?) JAWS + IE11 won't read the link text because it's nested in the legend element.Related:
https://www.powermapper.com/tests/screen-readers/labelling/fieldset-links/
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screen readers to read the link text
Screenshots
Current (
ChoiceList
):Possible Fix:
Moving the link out of the legends fixes the issue AFAIK.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Originally reported by @1Copenut here: https://jira.cms.gov/browse/MEA-215
The text was updated successfully, but these errors were encountered: