Conversation
patrickhlauke
left a comment
There was a problem hiding this comment.
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-labelledbyis wrongly used here since it overrides existinglabel: either we addlabel'sidas the first value inaria-labelledby, or we switch toaria-describedbyas 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