html - Does the aria-labelledby attribute require a label tag? -
on form, can aria-labelledby attribute work on own or require label tag?
example: work this
aria-labelledby="name"
read browser "name"?
"the aria-labelledby attribute used indicate ids of elements labels object." (mdn).
it not contain text label.
so no, doesn't work on own.
it doesn't require <label>
element, if <label>
correct html element context should use one. (start correct, semantic html, build aria on top of it).
Comments
Post a Comment