E-mail List Archives
Re: aria-disabled is really required
From: glen walker
Date: Mar 13, 2018 11:15AM
- Next message: Birkir R. Gunnarsson: "Re: aria-disabled is really required"
- Previous message: Tim Harshbarger: "Re: Having an application element gain focus when the pageloads?"
- Next message in Thread: Birkir R. Gunnarsson: "Re: aria-disabled is really required"
- Previous message in Thread: Kakarla Meharoon: "Re: aria-disabled is really required"
- View all messages in this Thread
> So to clarify, setting â¬Åaria-disabled for element not supporting
disabled is enough i.e. we don't have to do anything to the tabindex as
screen readers indicate that they are disabled?
Not exactly. Aria-disabled will cause the SR to say the element is
disabled, but like all other ARIA attributes, it does *not* change
behavior. If you have to set aria-disabled on a custom element, and that
element is focusable because you have tabindex=0, then setting
aria-disabled will not automatically remove that element from the tab
order. You have to do it yourself because you have a custom element.
For elements that natively support the disabled property (<input>,
<button>, etc), then all that is taken care of for you.
Same with the visuals of a disabled element. Native elements will
automatically look different when disabled but setting aria-disabled on
your custom element will not change its appearance. You'd need a class
like:
.myClass {
/* normal styling */
}
.myClass[aria-disabled="true"] {
/* stuff to make element look disabled */
}
- Next message: Birkir R. Gunnarsson: "Re: aria-disabled is really required"
- Previous message: Tim Harshbarger: "Re: Having an application element gain focus when the pageloads?"
- Next message in Thread: Birkir R. Gunnarsson: "Re: aria-disabled is really required"
- Previous message in Thread: Kakarla Meharoon: "Re: aria-disabled is really required"
- View all messages in this Thread