From aa5afb8b6b6f4ba90d3c456b5d92faf1a6e73d02 Mon Sep 17 00:00:00 2001 From: Aaron Cannon Date: Tue, 2 Feb 2016 15:03:14 -0600 Subject: [PATCH 1/2] Remove aria-expanded attribute The aria-expanded attribute is redundant here, as the natural state of a selected tab is expanded. It also causes the Jaws screen reader to read each tab, as it is arrowed to, strangely. --- lib/components/Tab.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/components/Tab.js b/lib/components/Tab.js index 51090143ed..7db986d189 100644 --- a/lib/components/Tab.js +++ b/lib/components/Tab.js @@ -62,7 +62,6 @@ module.exports = React.createClass({ role="tab" id={this.props.id} aria-selected={this.props.selected ? 'true' : 'false'} - aria-expanded={this.props.selected ? 'true' : 'false'} aria-disabled={this.props.disabled ? 'true' : 'false'} aria-controls={this.props.panelId} > From 721815ef20bd969f0a0a6f3e2c1c72dae4a2c708 Mon Sep 17 00:00:00 2001 From: Aaron Cannon Date: Tue, 2 Feb 2016 15:16:51 -0600 Subject: [PATCH 2/2] Update tests. --- lib/components/__tests__/Tab-test.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/components/__tests__/Tab-test.js b/lib/components/__tests__/Tab-test.js index 5127ab324e..703fdb6083 100644 --- a/lib/components/__tests__/Tab-test.js +++ b/lib/components/__tests__/Tab-test.js @@ -13,7 +13,6 @@ describe('Tab', function() { equal(node.className, 'ReactTabs__Tab'); equal(node.getAttribute('role'), 'tab'); equal(node.getAttribute('aria-selected'), 'false'); - equal(node.getAttribute('aria-expanded'), 'false'); equal(node.getAttribute('aria-disabled'), 'false'); equal(node.getAttribute('aria-controls'), null); equal(node.getAttribute('id'), null); @@ -33,7 +32,6 @@ describe('Tab', function() { equal(node.className, 'ReactTabs__Tab ReactTabs__Tab--selected'); equal(node.getAttribute('aria-selected'), 'true'); - equal(node.getAttribute('aria-expanded'), 'true'); equal(node.getAttribute('aria-controls'), '1234'); equal(node.getAttribute('id'), 'abcd'); equal(node.innerHTML, 'Hello');