-
-
Notifications
You must be signed in to change notification settings - Fork 364
[Icons] Improve aria attributes rendering #1797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can we do this only for these attributes?: ref #1709 (comment) |
First of all, sorry for the BC @norkunas I'm very not found of having distinct behaviour for specific attributes (one per one i mean), that will be something hard to maintain. I'd suggest another option: just hande "true" (boolean) for aria-attribute That would work like this
So just something to ease the DX but that let the developer responsible of setting a correct value. WDYT ? |
It's NOT a very big list to maintain, so imho to restore previous behavior it's easy to check for those attributes, and I have a WIP code for twig components |
My suggestion would not work for you ? |
If you mean that real boolean |
As it's already the case for all attributes. The only aria specific behaiour would be transforming I think this could be the easiest to maintain/document |
I think |
Well we cannot change this now 🤷♂️ Users do want to use booleans in their code (that was a recurrent demand, same thing for icon, CVA, live attributes ...) So i think my proposition works, but let's see what others think |
I feel like aria is a topic more complex than that and we tried to be too opinioned about that. If we look at the doc here: https://w3.org/WAI/WCAG21/Techniques/aria/ARIA24 they don't recommend setting the aria-label to true. WDYT ? |
No one wants or recommands to set the aria-label to true :) Where did you read that ? |
And why not? 🙂 undeprecating is easy, isn't it? 🙂 |
I should have quoted more text :) A choice has been made to use the boolean "false" to remove an attribute, as many persons asked, i don't see myself asking people to switch again and lose this feature (that would be a BC break). |
…dre) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [TwigComponent] Fix aria attribute cannot be removed Handle only "true" (the original need) and restore using false to remove an attribute cf #1709 and #1797 Commits ------- e3e9825 [TwigComponent] Fix aria attribute cannot be removed
65be5bb
to
aeded4a
Compare
Thanks Simon. |
Fix: #1796
false" strings (as previously done in TwigComponent)Update:
After discussion in this issue, i suggest we keep the current behaviour: "boolean false removes an attribute"
So just something to ease the DX but that let the developer responsible of setting a correct value.