3 ms·
one of the things that people not used to a11y get confused by is that since div and span elements carry no information you can't add aria-labels to them (or sh
by bryanrasmussen 4y ago
one of the things that people not used to a11y get confused by is that since div and span elements carry no information you can't add aria-labels to them (or shouldn't be able to, some readers may be non-compliant on this matter) without an explicit role. However you wouldn't be able to add them to any random element either.
Of course divs and spans do get the benefit that they are read as separate elements by screen readers, however this can also be a curse https://stackoverflow.com/questions/60869293/accessibility-readout-multiple-spans-in-div-as-a-single-sentence https://stackoverflow.com/questions/60869293/accessibility-r...
Don't know how it would behave with a bunch of readable-segment elements or what have you, as I haven't tested.