-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
docs(forms): switch to aria-describedby #38592
Conversation
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.
Yup, agree, that's wrong. any other places where we might have the same oversight?
I checked the forms page without luck but didn't check examples or cheatsheet. |
ah, now i remember where that came from... #37587 I was actually not convinced by that PR myself, but it was merged anyway. I would still say that the assertion at the basis of that PR is...debatable. I would suggest just wholesale reverting that PR, to be honest. |
i.e. also remove the paragraph that says authors should use |
Friendly ping @hannahiss and @Aniort. Might be interested in the topic. |
Yes, you're right, #37587 might have been merged a little bit too quickly... Please don't revert totally #37587 because the first part (in input-group) is still needed. |
While I understand the "could be a good idea" part, I personally think this ends up being massively overengineered for what it actually is/does (particularly for a generic example in our documentation). It's been generally accepted practice to use |
ah yes, good point. agree, that part is non-controversial and correct |
Agreed, if it's that much important it should probably be in |
I just reverted the callout changes from #37587, and also improved labels in select sizing examples—which previously mentioned class names… |
I think using aria-describedby instead of rewriting <label> via aria-labelledby is the good choice when infos are not mandatory and inserted in the <label>if not |
* docs(forms): switch to aria-describedby * docs(forms): revert twbs#37587 callout change * docs(forms): improved sizing select examples labels
Description
aria-labelledby
is wrongly used here since it overrides existinglabel
: either we addlabel
'sid
as the first value inaria-labelledby
, or we switch toaria-describedby
as done in this PR.In both cases, I think the callout before should mention this difference between the two attributes.
Friendly ping @patrickhlauke as you may have another recommendation. :)
Type of changes
Checklist
npm run lint
)I have added tests to cover my changesLive previews