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

XSS Vulnerability on closeText option of Dialog jQuery UI 1.11.4 #1622

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
27a88c8
Build: Update links to AUTHORS.txt and LICENSE.txt in package.json
scottgonzalez Nov 3, 2014
47ceff8
DatePicker: datepicker_instActive released on instance destroy
eshcharc Oct 19, 2014
c303f7e
Autocomplete: Remove duplicate array key in demo
bperel Oct 20, 2014
152c2d1
Demos: Remove duplicate CSS properties
bperel Oct 20, 2014
7b4d706
Dialog: Remove leftover backcompat flag in tests
scottgonzalez Oct 20, 2014
c3dcf4e
Selectmenu: Remove broken tabindex code
scottgonzalez Oct 22, 2014
9afe0f7
Datepicker: Fixed month names and firstDay value in Arabic locale
May 11, 2014
4686458
Tests: Adding missing dependency
tjvantoll Oct 23, 2014
dc2c948
Selectmenu: Properly parse value from options
scottgonzalez Nov 4, 2014
9dd1e73
Tabs: Suppress automatic activation when navigating with COMMAND
scottgonzalez Nov 3, 2014
28ab47c
Widget: Fix typos
scottgonzalez Nov 10, 2014
3116967
Easing: Fixed small typo in easing demo
agcolom Nov 16, 2014
69bd7a7
Widget: Improve readability in `$.widget.bridge()`
thg2k Dec 21, 2014
727a915
Build: Remove dates from copyright notice
agcolom Dec 21, 2014
dc2b17d
Accordion: Set `aria-expanded` when collapsing
scottgonzalez Jan 5, 2015
276cd5c
Position: Restore old flip collision handling
meyertee Sep 4, 2013
9db4057
Position: Add unit tests for bug 8710
meyertee Sep 4, 2013
f1345e3
Core: Match on exact node name for `:focusable` and `:tabbable`
SlimFoster Jan 9, 2015
7ff9b28
Resizable: Match on exact node name
SlimFoster Jan 9, 2015
ad121b2
DatePicker: Fix tests to have unique names
lukeapage Jan 10, 2015
76ebe08
DatePicker: increase date range so that tests still pass through 2015
lukeapage Jan 10, 2015
66b31b3
Tests: Fix jquery reference in unit index file
jzaefferer Jan 12, 2015
fcb26aa
Tests: Fix jQuery version references to match files in external/
jzaefferer Jan 12, 2015
dfa3a9f
Slider: Fix max calculation, when step is float
dekajp Jan 10, 2015
da67914
Docs: Clarify PHP Usage
lukeapage Jan 10, 2015
105f4a5
Resizable: Whitespace Cleanup
mikesherov Jan 28, 2015
0a0db09
Resizable: correct width when grid approaches zero
mikesherov Jan 28, 2015
fa460f3
Sortable: Add support for iframes
marcuswarrenca Feb 2, 2015
8dfc67d
Build: Update authors list
scottgonzalez Feb 11, 2015
aec0b62
Build: Updating the 1-11-stable version to 1.11.4-pre.
scottgonzalez Feb 12, 2015
258dbe3
Build: Use browserSets from testswarm config
Krinkle Feb 20, 2015
189f1d4
Sortable: Redetermine floating flag when recalculating positions
tjvantoll Oct 31, 2014
b371063
Draggable: Ensure parent is correct after dragging through sortable
mikesherov Nov 9, 2014
04ab6e0
Dialog: Stop tracking instance in destroy() to avoid memory leaks
tjvantoll Feb 18, 2015
de75b40
Accordion: Handle `box-sizing: border-box` in animations
scottgonzalez Mar 2, 2015
65f31c2
Resizable: Modified to allow jquery objects as handles
patrixd Nov 14, 2013
31e7099
Resizable: alsoResize more than one element of a jQuery selection
benmosher Aug 25, 2014
0f99e9c
Slider: Modified to allow value to reach max value with float step
atomiomi Mar 4, 2015
d699725
Dialog: Fix typo
scottgonzalez Feb 23, 2015
ddc1b32
Sortable: Append a tr with td to the placeholder of tbody elements
oemmes Oct 31, 2014
1c92d68
Tabs: Use standard promise methods for jqXHR
scottgonzalez Feb 23, 2015
88291ff
Tooltip: Register event handlers before content is loaded
mziech Feb 24, 2015
40cdb5f
Build: Update authors list
scottgonzalez Mar 10, 2015
b93df29
Build: Updating the 1-11-stable version to 1.11.5-pre.
scottgonzalez Mar 11, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,15 @@ Will Holley <[email protected]>
Uri Gilad <[email protected]>
Richard Gibson <[email protected]>
Simen Bekkhus <[email protected]>
Chen Eshchar <[email protected]>
Bruno Pérel <[email protected]>
Mohammed Alshehri <[email protected]>
Anne-Gaelle Colom <[email protected]>
Adam Foster <[email protected]>
Luke Page <[email protected]>
Marcus Warren <[email protected]>
Patricia Juarez <[email protected]>
Ben Mosher <[email protected]>
Ablay Keldibek <[email protected]>
Nils Heuermann <[email protected]>
Marco Ziech <[email protected]>
67 changes: 41 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,68 +16,83 @@ This is the best way to contribute to jQuery UI. Please read through the full gu

Every week (unless otherwise noted) the jQuery UI team has a meeting to discuss the progress of current work and to bring forward possible new blockers for discussion. The meeting is held on [IRC](http://irc.jquery.org) in the #jquery-meeting channel at [Noon EST](http://www.timeanddate.com/worldclock/fixedtime.html?month=1&day=17&year=2011&hour=12&min=0&sec=0&p1=43) on Wednesdays. Meeting notes are posted on http://meetings.jquery.org/category/ui/ after each meeting.

## Tips For Bug Patching
## Tips for Getting Started

### Environment: localhost w/ PHP, Node.js & Grunt
### Environment: Minimum Required

jQuery UI uses Node.js & Grunt to automate the building and validation of source code.
If you are contributing changes you will need a fork of jquery-ui (see [Getting the Source](#environment-getting-the-source)). If you just want the source code you could clone jquery-ui directly:

Some tests depend on PHP running locally, so make sure you have the following installed:

* A web server with PHP support (any will do, such as [XAMPP](http://www.apachefriends.org/en/xampp.html) or [MAMP](http://www.mamp.info/en/index.html))
* [Node.js](http://nodejs.org/) (includes NPM, necessary for the next step)
* Grunt (install with: `npm install -g grunt`)
```bash
git clone git://github.com/jquery/jquery-ui.git
cd jquery-ui
```

### Build a Local Copy of jQuery UI
The tests can run in any local web server. Ideally you should test your patch in appropriate web browsers and if possible run `grunt` to lint the code and run automated tests (this will happen automatically when you create a pull request). See the [Recommended Setup](#environment-recommended-setup) for setting up Node.js so that the grunt command works.

Create a fork of the jQuery UI repo on GitHub at http://github.com/jquery/jquery-ui.
### Environment: Getting the Source

Change directory to your web root directory, whatever that might be:
* Create a fork of the jQuery UI repo on GitHub at http://github.com/jquery/jquery-ui. This will create a fork of jquery-ui in your Github account.
* You may want to clone jquery-ui under the path to your web server. If so, change to the required directory

```bash
$ cd /path/to/your/www/root/
cd /path/to/your/www/root/
```

Clone your jQuery UI fork to work locally.

*Note: be sure to replace `[USERNAME]` with your GitHub username.*
* Clone your jQuery UI git repo.

```bash
$ git clone [email protected]:[USERNAME]/jquery-ui.git
git clone git://github.com/[USERNAME]/jquery-ui.git
cd jquery-ui
```

Change to the newly created directory.
*Note: be sure to replace `[USERNAME]` with your GitHub username.*

* Add the official jQuery repository as a remote. We recommend naming it "upstream".

```bash
$ cd jquery-ui
git remote add upstream git://github.com/jquery/jquery-ui.git
```

Add the official jQuery repository as a remote. We recommend naming it "upstream".
* Get in the habit of pulling in the "upstream" master to stay up to date as jQuery UI receives new commits.

```bash
$ git remote add upstream git://github.com/jquery/jquery-ui.git
git pull upstream master
```

Get in the habit of pulling in the "upstream" master to stay up to date as jQuery UI receives new commits.
### Environment: Recommended Setup

jQuery UI uses Node.js & Grunt to automate the building and validation of source code. Here is how to set that up:

* Get [Node.js](http://nodejs.org/) (includes NPM, necessary for the next step)
* Install Grunt cli:

```bash
$ git pull upstream master
npm install -g grunt-cli
```

Install the dependencies.
* Install local Node.js modules

```bash
npm install
```

The tests require a local web server and the samples contain some PHP, so a PHP web server may be useful.

* Install a web server. Here are some you could use:
* Windows: [WAMP download](http://www.wampserver.com/en/)
* Mac: [MAMP download](http://www.mamp.info/en/index.html)
* Linux: [Setting up LAMP](https://www.linux.com/learn/tutorials/288158-easy-lamp-server-installation)
* [Mongoose (most platforms)](http://code.google.com/p/mongoose/)
* [http-server](https://www.npmjs.com/package/http-server)

### Running the Tests

To lint the JavaScript, HTML, and CSS, as well as run a smoke test in PhantomJS, run grunt:

```bash
$ grunt
grunt
```

To run the tests for a specific plugin in your browser, open the appropriate file from the `/tests/unit/` directory, for example: `http://localhost/tests/unit/accordion/accordion.html`. The domain will be dependent on your local server configuration; if there is a port, be sure to include it.

Ideally you would test in all of our [supported browsers](http://jqueryui.com/browser-support/), but if you don't have all of these browsers available, that's ok.

Make sure to read our [commits and pull requests documentation](http://dev.contribute.jquery.org/commits-and-pull-requests/) for full details on working with branches and forks, as well as our commit guidelines.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function createBanner( files ) {
"<%= grunt.template.today('isoDate') %>\n" +
"<%= pkg.homepage ? '* ' + pkg.homepage + '\\n' : '' %>" +
(files ? "* Includes: " + fileNames.join(", ") + "\n" : "") +
"* Copyright <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" +
"* Copyright <%= pkg.author.name %>;" +
" Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n";
}

Expand Down
3 changes: 1 addition & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Copyright 2007, 2014 jQuery Foundation and other contributors,
https://jquery.org/
Copyright jQuery Foundation and other contributors, https://jquery.org/

This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
Expand Down
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If you are interested in helping develop jQuery UI, you are in the right place.
To discuss development with team members and the community, visit the [Developing jQuery UI Forum](http://forum.jquery.com/developing-jquery-ui) or [#jqueryui-dev on irc.freenode.net](http://irc.jquery.org/).


## For contributors
## For Contributors

If you want to help and provide a patch for a bugfix or new feature, please take
a few minutes and look at [our Getting Involved guide](http://wiki.jqueryui.com/w/page/35263114/Getting-Involved).
Expand All @@ -21,35 +21,21 @@ In general, fork the project, create a branch for a specific change and send a
pull request for that branch. Don't mix unrelated changes. You can use the commit
message as the description for the pull request.

For more information, see the [contributing page](CONTRIBUTING.md).

## Running the Unit Tests

Run the unit tests with a local server that supports PHP. No database is required. Pre-configured php local servers are available for Windows and Mac. Here are some options:

- Windows: [WAMP download](http://www.wampserver.com/en/)
- Mac: [MAMP download](http://www.mamp.info/en/index.html)
- Linux: [Setting up LAMP](https://www.linux.com/learn/tutorials/288158-easy-lamp-server-installation)
- [Mongoose (most platforms)](http://code.google.com/p/mongoose/)
Run the unit tests manually with appropriate browsers and any local web server. See our [environment setup](CONTRIBUTING.md#environment-minimum-required) and [information on running tests](CONTRIBUTING.md#running-the-tests).

You can also run the unit tests inside phantomjs by [setting up your environment](CONTRIBUTING.md#user-content-environment-recommended-setup).

## Building jQuery UI

jQuery UI uses the [Grunt](http://github.com/gruntjs/grunt) build system.
jQuery UI uses the [Grunt](http://gruntjs.com/) build system.

To build jQuery UI, you must have [node.js](http://nodejs.org/) installed and then run the following commands:
To build jQuery UI, [setup your environment]([setting up your environment](CONTRIBUTING.md#environment-minimum-required)) and then run the following commands:

```sh

# Install the Grunt CLI
npm install -g grunt-cli

# Clone the jQuery UI git repo
git clone git://github.com/jquery/jquery-ui.git
cd jquery-ui

# Install the node module dependencies
npm install

# Run the concat task to concatenate files
grunt concat

Expand Down
2 changes: 1 addition & 1 deletion build/tasks/testswarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function submit( commit, runs, configFile, extra, done ) {
name: "Commit <a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra,
runs: runs,
runMax: config.runMax,
browserSets: [ "popular-ui" ],
browserSets: config.browserSets,
timeout: 1000 * 60 * 30
}, function( error, passed ) {
if ( error ) {
Expand Down
1 change: 0 additions & 1 deletion demos/autocomplete/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@
"Glossy Ibis"=>"Plegadis falcinellus",
"Spanish Imperial Eagle"=>"Aquila adalberti",
"Lesser Kestrel"=>"Falco naumanni",
"Houbara Bustard"=>"Chlamydotis undulata",
"Crab-Plover"=>"Dromas ardeola",
"Cream-coloured Courser"=>"Cursorius cursor",
"Collared Pratincole"=>"Glareola pratincola",
Expand Down
2 changes: 1 addition & 1 deletion demos/effect/easing.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<div id="graphs"></div>

<div class="demo-description">
<p><strong>All easings provided by jQuery UI are drawn above, using a HTML canvas element</strong>. Click a diagram to see the easing in action.</p>
<p><strong>All easings provided by jQuery UI are drawn above, using an HTML canvas element</strong>. Click a diagram to see the easing in action.</p>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion demos/sortable/empty-lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script src="../../ui/sortable.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
#sortable1, #sortable2, #sortable3 { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; background: #eee; padding: 5px; width: 143px;}
#sortable1, #sortable2, #sortable3 { list-style-type: none; margin: 0; float: left; margin-right: 10px; background: #eee; padding: 5px; width: 143px;}
#sortable1 li, #sortable2 li, #sortable3 li { margin: 5px; padding: 5px; font-size: 1.2em; width: 120px; }
</style>
<script>
Expand Down
2 changes: 1 addition & 1 deletion demos/tabs/ajax.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$(function() {
$( "#tabs" ).tabs({
beforeLoad: function( event, ui ) {
ui.jqXHR.error(function() {
ui.jqXHR.fail(function() {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo." );
Expand Down
2 changes: 1 addition & 1 deletion demos/tabs/vertical.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
.ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; }
.ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }
.ui-tabs-vertical .ui-tabs-nav li a { display:block; }
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; }
.ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right; width: 40em;}
</style>
</head>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "jquery-ui",
"title": "jQuery UI",
"description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.",
"version": "1.11.3-pre",
"version": "1.11.5-pre",
"homepage": "http://jqueryui.com",
"author": {
"name": "jQuery Foundation and other contributors",
"url": "https://github.com/jquery/jquery-ui/blob/master/AUTHORS.txt"
"url": "https://github.com/jquery/jquery-ui/blob/1-11-stable/AUTHORS.txt"
},
"maintainers": [
{
Expand Down Expand Up @@ -53,7 +53,7 @@
"licenses": [
{
"type": "MIT",
"url": "https://github.com/jquery/jquery-ui/blob/master/LICENSE.txt"
"url": "https://github.com/jquery/jquery-ui/blob/1-11-stable/LICENSE.txt"
}
],
"scripts": {
Expand Down
80 changes: 55 additions & 25 deletions tests/unit/accordion/accordion_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ test( "handle click on header-descendant", function() {
});

test( "accessibility", function () {
expect( 37 );
expect( 61 );
var element = $( "#list1" ).accordion({
active: 1
active: 1,
collapsible: true
}),
headers = element.find( ".ui-accordion-header" );

Expand All @@ -45,31 +46,60 @@ test( "accessibility", function () {
});

equal( headers.eq( 1 ).attr( "tabindex" ), 0, "active header has tabindex=0" );
equal( headers.eq( 1 ).attr( "aria-selected" ), "true", "active tab has aria-selected=true" );
equal( headers.eq( 1 ).attr( "aria-expanded" ), "true", "active tab has aria-expanded=true" );
equal( headers.eq( 1 ).next().attr( "aria-hidden" ), "false", "active tabpanel has aria-hidden=false" );
equal( headers.eq( 0 ).attr( "tabindex" ), -1, "inactive header has tabindex=-1" );
equal( headers.eq( 0 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected=false" );
equal( headers.eq( 0 ).attr( "aria-expanded" ), "false", "inactive tab has aria-expanded=false" );
equal( headers.eq( 0 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel has aria-hidden=true" );
equal( headers.eq( 2 ).attr( "tabindex" ), -1, "inactive header has tabindex=-1" );
equal( headers.eq( 2 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected=false" );
equal( headers.eq( 2 ).attr( "aria-expanded" ), "false", "inactive tab has aria-expanded=false" );
equal( headers.eq( 2 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel has aria-hidden=true" );
equal( headers.eq( 1 ).attr( "aria-selected" ), "true", "active tab (1) has aria-selected=true" );
equal( headers.eq( 1 ).attr( "aria-expanded" ), "true", "active tab (1) has aria-expanded=true" );
equal( headers.eq( 1 ).next().attr( "aria-hidden" ), "false", "active tabpanel (1) has aria-hidden=false" );
equal( headers.eq( 0 ).attr( "tabindex" ), -1, "inactive header (0) has tabindex=-1" );
equal( headers.eq( 0 ).attr( "aria-selected" ), "false", "inactive tab (0) has aria-selected=false" );
equal( headers.eq( 0 ).attr( "aria-expanded" ), "false", "inactive tab (0) has aria-expanded=false" );
equal( headers.eq( 0 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel (0) has aria-hidden=true" );
equal( headers.eq( 2 ).attr( "tabindex" ), -1, "inactive header (2) has tabindex=-1" );
equal( headers.eq( 2 ).attr( "aria-selected" ), "false", "inactive tab (2) has aria-selected=false" );
equal( headers.eq( 2 ).attr( "aria-expanded" ), "false", "inactive tab (2) has aria-expanded=false" );
equal( headers.eq( 2 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel (2) has aria-hidden=true" );

element.accordion( "option", "active", 0 );
equal( headers.eq( 0 ).attr( "tabindex" ), 0, "active header has tabindex=0" );
equal( headers.eq( 0 ).attr( "aria-selected" ), "true", "active tab has aria-selected=true" );
equal( headers.eq( 0 ).attr( "aria-expanded" ), "true", "active tab has aria-expanded=true" );
equal( headers.eq( 0 ).next().attr( "aria-hidden" ), "false", "active tabpanel has aria-hidden=false" );
equal( headers.eq( 1 ).attr( "tabindex" ), -1, "inactive header has tabindex=-1" );
equal( headers.eq( 1 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected=false" );
equal( headers.eq( 1 ).attr( "aria-expanded" ), "false", "inactive tab has aria-expanded=false" );
equal( headers.eq( 1 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel has aria-hidden=true" );
equal( headers.eq( 2 ).attr( "tabindex" ), -1, "inactive header has tabindex=-1" );
equal( headers.eq( 2 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected=false" );
equal( headers.eq( 2 ).attr( "aria-expanded" ), "false", "inactive tab has aria-expanded=false" );
equal( headers.eq( 2 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel has aria-hidden=true" );
equal( headers.eq( 0 ).attr( "tabindex" ), 0, "active header (0) has tabindex=0" );
equal( headers.eq( 0 ).attr( "aria-selected" ), "true", "active tab (0) has aria-selected=true" );
equal( headers.eq( 0 ).attr( "aria-expanded" ), "true", "active tab (0) has aria-expanded=true" );
equal( headers.eq( 0 ).next().attr( "aria-hidden" ), "false", "active tabpanel (0) has aria-hidden=false" );
equal( headers.eq( 1 ).attr( "tabindex" ), -1, "inactive header (1) has tabindex=-1" );
equal( headers.eq( 1 ).attr( "aria-selected" ), "false", "inactive tab (1) has aria-selected=false" );
equal( headers.eq( 1 ).attr( "aria-expanded" ), "false", "inactive tab (1) has aria-expanded=false" );
equal( headers.eq( 1 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel (1) has aria-hidden=true" );
equal( headers.eq( 2 ).attr( "tabindex" ), -1, "inactive header (2) has tabindex=-1" );
equal( headers.eq( 2 ).attr( "aria-selected" ), "false", "inactive tab (2) has aria-selected=false" );
equal( headers.eq( 2 ).attr( "aria-expanded" ), "false", "inactive tab (2) has aria-expanded=false" );
equal( headers.eq( 2 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel (2) has aria-hidden=true" );

element.accordion( "option", "active", false );
equal( headers.eq( 0 ).attr( "tabindex" ), 0, "previously active header (0) has tabindex=0" );
equal( headers.eq( 0 ).attr( "aria-selected" ), "false", "inactive tab (0) has aria-selected=false" );
equal( headers.eq( 0 ).attr( "aria-expanded" ), "false", "inactive tab (0) has aria-expanded=false" );
equal( headers.eq( 0 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel (0) has aria-hidden=true" );
equal( headers.eq( 1 ).attr( "tabindex" ), -1, "inactive header (1) has tabindex=-1" );
equal( headers.eq( 1 ).attr( "aria-selected" ), "false", "inactive tab (1) has aria-selected=false" );
equal( headers.eq( 1 ).attr( "aria-expanded" ), "false", "inactive tab (1) has aria-expanded=false" );
equal( headers.eq( 1 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel (1) has aria-hidden=true" );
equal( headers.eq( 2 ).attr( "tabindex" ), -1, "inactive header (2) has tabindex=-1" );
equal( headers.eq( 2 ).attr( "aria-selected" ), "false", "inactive tab (2) has aria-selected=false" );
equal( headers.eq( 2 ).attr( "aria-expanded" ), "false", "inactive tab (2) has aria-expanded=false" );
equal( headers.eq( 2 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel (2) has aria-hidden=true" );

element.accordion( "option", "active", 1 );
equal( headers.eq( 1 ).attr( "tabindex" ), 0, "active header has tabindex=0" );
equal( headers.eq( 1 ).attr( "aria-selected" ), "true", "active tab (1) has aria-selected=true" );
equal( headers.eq( 1 ).attr( "aria-expanded" ), "true", "active tab (1) has aria-expanded=true" );
equal( headers.eq( 1 ).next().attr( "aria-hidden" ), "false", "active tabpanel (1) has aria-hidden=false" );
equal( headers.eq( 0 ).attr( "tabindex" ), -1, "inactive header (0) has tabindex=-1" );
equal( headers.eq( 0 ).attr( "aria-selected" ), "false", "inactive tab (0) has aria-selected=false" );
equal( headers.eq( 0 ).attr( "aria-expanded" ), "false", "inactive tab (0) has aria-expanded=false" );
equal( headers.eq( 0 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel (0) has aria-hidden=true" );
equal( headers.eq( 2 ).attr( "tabindex" ), -1, "inactive header (2) has tabindex=-1" );
equal( headers.eq( 2 ).attr( "aria-selected" ), "false", "inactive tab (2) has aria-selected=false" );
equal( headers.eq( 2 ).attr( "aria-expanded" ), "false", "inactive tab (2) has aria-expanded=false" );
equal( headers.eq( 2 ).next().attr( "aria-hidden" ), "true", "inactive tabpanel (2) has aria-hidden=true" );

});

asyncTest( "keyboard support", function() {
Expand Down
Loading