Skip to content

aria-disabled non-focusable descendents #1130

@WilcoFiers

Description

@WilcoFiers

Currently, the ARIA spec says the following about using aria-disabled to disable descendants:

https://www.w3.org/TR/wai-aria-1.1/#aria-disabled
The state of being disabled applies to the current element and all focusable descendant elements of the element on which the aria-disabled attribute is applied.

That would suggest that in the following code snippet the textfield would not be disabled:

<div role="group" aria-disabled="true" aria-labelledby="legend">
  <div id="legend">Personal information</div>
  <div id="givenname">Given name</div>
  <div role="textbox" aria-labelledby="givenname"></div>
</div>

I checked this against Chrome and Firefox. Chrome considers the textbox disabled. Firefox seems to ignore aria-disabled on ancestors regardless of if it is focusable or not. So neither browser seem to conform to spec.

I think Chrome's behaviour is the sensible one here, as it is consistent with what the HTML specification says should happen when using native elements. In the following example the disabled attribute on the fieldset disables he input element. The input element is not focusable because of it:

<fieldset>
  <legend>Personal information</legend>
  <label for="givenname">Given name</label>
  <input type="text" id="givenname">
</fieldset>

I do not know if this "all focusable descendant elements" is intentional, but it is inconsistent with the HTML specification, and the implementation for it seems to be lacking. Would it be possible to align this with the behaviour of the disabled attribute in HTML?

Metadata

Metadata

Labels

clarificationclarifying or correcting language that is either confusing, misleading or under-specified

Type

No type

Projects

Status

James Nurthen

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions