Unverified Commit e01551a6 authored by Lyza Gardner's avatar Lyza Gardner Committed by GitHub

Merge pull request #2189 from hypothesis/add-aria-expanded

Use `aria-expanded` instead of `aria-pressed` per a11y audit
parents 20796094 aac3fe5e
...@@ -119,7 +119,7 @@ describe('TopBar', () => { ...@@ -119,7 +119,7 @@ describe('TopBar', () => {
wrapper.update(); wrapper.update();
assert.isTrue(helpButton.props().isPressed); assert.isTrue(helpButton.props().isExpanded);
}); });
context('help service handler configured in services', () => { context('help service handler configured in services', () => {
...@@ -228,7 +228,7 @@ describe('TopBar', () => { ...@@ -228,7 +228,7 @@ describe('TopBar', () => {
const wrapper = createTopBar(); const wrapper = createTopBar();
const shareButton = getButton(wrapper, 'share'); const shareButton = getButton(wrapper, 'share');
assert.isTrue(shareButton.prop('isPressed')); assert.isTrue(shareButton.prop('isExpanded'));
}); });
it('displays search input in the sidebar', () => { it('displays search input in the sidebar', () => {
......
...@@ -105,7 +105,7 @@ function TopBar({ ...@@ -105,7 +105,7 @@ function TopBar({
<Button <Button
className="top-bar__icon-button" className="top-bar__icon-button"
icon="help" icon="help"
isPressed={currentActivePanel === uiConstants.PANEL_HELP} isExpanded={currentActivePanel === uiConstants.PANEL_HELP}
onClick={requestHelp} onClick={requestHelp}
title="Help" title="Help"
useCompactStyle useCompactStyle
...@@ -135,7 +135,7 @@ function TopBar({ ...@@ -135,7 +135,7 @@ function TopBar({
<Button <Button
className="top-bar__icon-button" className="top-bar__icon-button"
icon="share" icon="share"
isPressed={ isExpanded={
currentActivePanel === uiConstants.PANEL_SHARE_ANNOTATIONS currentActivePanel === uiConstants.PANEL_SHARE_ANNOTATIONS
} }
onClick={toggleSharePanel} onClick={toggleSharePanel}
...@@ -146,7 +146,7 @@ function TopBar({ ...@@ -146,7 +146,7 @@ function TopBar({
<Button <Button
className="top-bar__icon-button" className="top-bar__icon-button"
icon="help" icon="help"
isPressed={currentActivePanel === uiConstants.PANEL_HELP} isExpanded={currentActivePanel === uiConstants.PANEL_HELP}
onClick={requestHelp} onClick={requestHelp}
title="Help" title="Help"
useCompactStyle useCompactStyle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment