4 ms·
Front end web is not my forte, but as I understand display:none; can have unintended (usually negative) interactions with screen readers, which I don't believe
by kitsunesoba 4y ago
Front end web is not my forte, but as I understand display:none; can have unintended (usually negative) interactions with screen readers, which I don't believe is a possibility with HTML templates.
- grimgrin 4y agoThere’s a way to hide from screen readers too if the OP was so inclined: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden https://developer.mozilla.org/en-US/docs/Web/Accessibility/A...
- cantSpellSober 4y agodisplay: none hides the content from screen readers, as it is not rendered. aria-hidden is for elements that were rendered but are hidden (it's redundant on elements with a display value of `none`)
- grimgrin 4y agooh yes yes. what was i thinking! ty for correction
- ataylor32 4y agoAre you sure? It's my understanding that screen readers know to ignore elements with display:none;
- lelandfe 4y agoThis is not true. I suspect it is a myth, I've heard it for decades now. WebAIM[0]: > display:none or visibility: hidden > The content is removed from the visual flow of the page and is ignored by screen readers [0] https://webaim.org/techniques/css/invisiblecontent/#techniques https://webaim.org/techniques/css/invisiblecontent/#techniqu...