aria tag gets removed entirely on "false"
See original GitHub issueWhen you use a screenreader to visit an accordion (dropdown) you need the aria-expanded to be “false” on init. Vue automatically removes the aria-expanded tag entirely when false. Is there a way to keep the aria-expanded tag with a “false” value.
<button type="button" class="bl-panel__header bl-panel__header--has-action" @click.prevent="isOpened1 = !isOpened1" :aria-expanded="isOpened1" aria-controls="dropdown-1">
<span aria-hidden="true" class="bl-panel__header__toggle vi vi-u-badge vi-u-badge--small vi-arrow vi-u-90deg" :class="{'bl-panel__header__toggle--reverse': !isOpened1}"></span>
<div class="bl-panel__header__content">
<h1 class="bl-panel__header__content__title">
Call to action (button)
</h1>
<h2 class="bl-panel__header__content__subtitle">
Schoolabonnementen
</h2>
</div>
</button>
:aria-expanded=“isOpened1” is removed on false.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
False value cause aria boolean attributes to be removed from ...
Aria attributes are not present in the DOM when their value is false. Unlike for html 5 boolean values, removing aria attributes from...
Read more >aria-disabled - Accessibility - MDN Web Docs
The aria-disabled state indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
Read more >Using ARIA - W3C
This document is a practical guide for developers on how to add accessibility information to HTML elements using the Accessible Rich Internet ...
Read more >What you need to know about ARIA and how to fix common ...
It's common for the wrong aria-label to get assigned because the code was copied and pasted and then changed. The issue isn't caught...
Read more >Know your ARIA: 'Hidden' vs 'None' | scottohara.me
Conversely, If the element has aria-hidden=false it is meant to be exposed to assistive technologies as if the attribute were not set at...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can stringify your variable.
@ktsn Genius! Thanks!