Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Slider's aria-disabled attribute does not update #272

Closed
marcysutton opened this issue Sep 16, 2014 · 1 comment
Closed

Slider's aria-disabled attribute does not update #272

marcysutton opened this issue Sep 16, 2014 · 1 comment
Labels
a11y This issue is related to accessibility type: bug

Comments

@marcysutton
Copy link
Contributor

On a material-slider with a disabled expression such as ng-disabled="color.green < 125", aria-disabled does not update to true along with the presence of the disabled attribute. It looks like updateAriaDisabled() should be routed through the $watch function, but it isn't being fired when the disabled condition is met.

Mismatched aria-disabled and disabled attributes on Material slider

A little more about the disabled attribute: it's not semantically valid on a custom element without extending a native element such as input via a Web Component. http://www.w3.org/TR/html5/disabled-elements.html
I wonder if it makes sense to only use aria-disabled for the current state since there is also disabled and ng-disabled? Attribute city.

@marcysutton marcysutton added a11y This issue is related to accessibility type: bug labels Sep 16, 2014
@ajoslin
Copy link
Contributor

ajoslin commented Sep 17, 2014

Found the problem: slider was trying to watch the ngDisabled expression on its own scope, which is an isolate scope.

The ngDisabled expression always evaluated to false because the value is undefined.

Fix: use scope.$parent.$watch(attr.ngDisabled)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This issue is related to accessibility type: bug
Projects
None yet
Development

No branches or pull requests

2 participants