Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accordion: Set aria-expanded when collapsing #1413

Closed

Conversation

scottgonzalez
Copy link
Member

Fixes #10703

@@ -499,7 +502,7 @@ return $.widget( "ui.accordion", {
});
} else if ( toShow.length ) {
this.headers.filter(function() {
return $( this ).attr( "tabIndex" ) === 0;
return $( this ).attr( "tabIndex" ) === "0";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't check this in all browsers. The value is supposed to be an integer, but since attributes are strings, that's what we get back. @jquery/core Is this the best way to do this check or should we parseInt()?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK IE8 is fine here; IE<8 have attroperties and they return numbers but you don't support IE<8 so it should be good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to use parseInt for the best compat. I think on older versions core returns a number when it should return a string. Looks like it changed in 1.8.something http://jsfiddle.net/qvpq4wo1/

scottgonzalez added a commit that referenced this pull request Feb 9, 2015
Fixes #10703
Closes gh-1413
(cherry picked from commit ab798cb)
@scottgonzalez scottgonzalez deleted the accordion-aria-collapse branch April 27, 2015 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants