-
Notifications
You must be signed in to change notification settings - Fork 1
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
Ltd 4637 add aria labelledby to ecju textarea #1764
Conversation
6b2eadd
to
2e5772d
Compare
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 doesn't seem like the right fix to the problem to me personally.
If we are pointing at this element and calling it a label then it probably should just be the label.
Alternatively I think we could use aria-label
but it seems very strange to have an element be both the aria label and description, which suggests to me we're getting something else wrong.
I need to check out the ARIA docs. Was hoping for some of the feedback re:description vs label. The description, we get for free.
To clarify - to get here would removing the aria-describedby be enough ? It looks like there used to be a preference for labelledby vs label, but that was a while ago, e.g. https://stackoverflow.com/a/19616909 - then again I don't know how often people update their screenreaders. |
Wrote that + realised you probably meant using the field label ? |
In this case it looks like the label of the field is deliberately blank, so it might make sense using labelledby and removing the describedby. |
I wonder if having the |
What I'm saying though is, why isn't the help text just the label? We're literally saying it's a label via the aria element so why not just make it the label? |
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.
test coverage looks good. also I'm pretty sure that this solves the issue, as the help text is now associated with the textarea when looking using the Chrome DevTools Accessibility tool, and it wasn't before
@kevincarrogan making the help text a label, is the most straightforward thing. The default styling for labels, is to have black text + slightly different spacing, can we live with that or should we change the style. On the side of living with it: these styles come from the govuk design system, we should leave them. On the side of changing it to grey and changing the spacing: We aren't changing the design (though makes me wonder if the users would care) - might see what Colin thinks. |
510df51
to
1a68f62
Compare
…area point to the supplied govuk-hint widget.
1a68f62
to
945e7fe
Compare
Codecov upload limit reached
|
Add aria-labelledby to the reason for closing textarea, this references the hint widget.
Added a unit test to verify this, as well as the existing aria-describedby attribute.