Replies: 3 comments
-
@ibftcorp, I understand your arguments, but I’m not sure we should go this way. I don’t like the idea of creating a JS script that removes the I think we should keep the button as simple as possible for now. The user should use |
Beta Was this translation helpful? Give feedback.
-
@cirdes The proposed solution is not adding a Javascript code to remove a The main idea is that disabling an element with the disabled HTML prop removes it from the screen reader DOM, making it inaccessible. You cannot TAB or get to this element using focus. The issue created by @ibftcorp proposes the idea of inclusive components. The solution proposed is solid and accessible. If the If the user you are talking about is the developer, this is a way to build more inclusive applications, and this won't change any behavior of the disable button. The final user will still get a disabled button at the end. If you expect developers to remember to add Knowing that accessible code is not provided by the browser by default for all components implies that we will have to do it ourselves. "The World Health Organization (WHO) has identified over 1 billion disabled people in the world. This corresponds to approx. 15% of the world’s population!" |
Beta Was this translation helpful? Give feedback.
-
This sounds interesting if you can do it without adding JS. If you could open a PR we would love to check it out! |
Beta Was this translation helpful? Give feedback.
-
This is a recommendation to make the Button more inclusive to all users. The reference for this is across other website, but basically, I will highlight this part of A11Y-101.com:
Reference: https://a11y-101.com/development/aria-disabled
What is the issue?
disabled
property is there.How can we fix?
aria-disabled
property to the button, but this alone will cause a few problems, especially if you expect that developers will remember that to make an accessible button, you need to pass aria-disabled instead of the intuititedisabled
attribute.disabled
attribute, you ignore internally in the component, and add aria-disabled instead;event.preventDefault();
This example is in react, but it's easy to see that is simple javascript: https://github.com/Automattic/vip-design-system/blob/trunk/src/system/Button/Button.tsx#L32-L43
Beta Was this translation helpful? Give feedback.
All reactions