Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Ensure boolean values for aria-* attributes #11365

Closed
wants to merge 1 commit into from

Conversation

fredsa
Copy link
Contributor

@fredsa fredsa commented Mar 18, 2015

aria-* (e.g. aria-hidden) values should mirror the truthiness of their ng-*
counterparts (e.g. ng-show, ng-hide) instead of their actual value

aria-* (e.g. aria-hidden) values should mirror the truthiness of their ng-*
counterparts (e.g. ng-show, ng-hide) instead of their actual value
@fredsa
Copy link
Contributor Author

fredsa commented Mar 18, 2015

Example of a problem:

<input type="text" model="foo">
<div ng-show="foo">…</div>

If a user types "bar" into the text field, foo will have a string value of "bar" and ng-show will correctly make the div visible. However, with ngAria module in use, aria-hidden attribute will (without this pull request) also have the value "bar", which is invalid. Instead, we want aria-hidden to mirror the truthiness of ng-show, and just have a value of true or false.

@Narretz
Copy link
Contributor

Narretz commented Mar 19, 2015

Hi, thanks for the PR. Would you be able to write a test for this?

@Narretz
Copy link
Contributor

Narretz commented Apr 20, 2015

Just to make sure, @marcysutton do you think this a valid issue?

@marcysutton
Copy link
Contributor

That does sound valid to me–aria-hidden needs a string true or false value to properly hide.

@Narretz Narretz self-assigned this Apr 21, 2015
Narretz added a commit to Narretz/angular.js that referenced this pull request May 28, 2015
Narretz pushed a commit to Narretz/angular.js that referenced this pull request May 28, 2015
aria-hidden should mirror the boolean representation of their ng-*
counterpart (ng-show, ng-hide) instead of their actual value

Closes angular#11365
Narretz pushed a commit to Narretz/angular.js that referenced this pull request May 28, 2015
aria-hidden should mirror the boolean representation of their ng-*
counterpart (ng-show, ng-hide) instead of their actual value

Closes angular#11365
Narretz pushed a commit to Narretz/angular.js that referenced this pull request Jun 1, 2015
aria-hidden should mirror the boolean representation of their ng-*
counterpart (ng-show, ng-hide) instead of their actual value. Same
applies to aria-disabled and ng-disabled

Closes angular#11365
@Narretz Narretz closed this in 5927335 Jun 1, 2015
netman92 pushed a commit to netman92/angular.js that referenced this pull request Aug 8, 2015
aria-hidden should mirror the boolean representation of their ng-*
counterpart (ng-show, ng-hide) instead of their actual value. Same
applies to aria-disabled and ng-disabled

Closes angular#11365
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants