-
Notifications
You must be signed in to change notification settings - Fork 842
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
Fixes for accessibility tickets #821
Merged
Merged
Changes from 6 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
36f91ad
pagination labeling fixes #735
snide e39a031
fixes #621 adds menubar roles to side nav
snide 48b16d8
fixes #734, adds more descriptive aria labeling for pagination
snide 5355ddf
update snapshots
snide b8639bc
fixes #729, apply aria-live to popovers
snide 81ada28
fixes #723, provides screen reader notice for bottom bar appearance
snide 3614a0e
fix ownFocus needing to be true for non-context menu sitations. apply…
snide 7b36ccf
feedback
snide 4cf3206
fixes #616 adds home page label
snide fdd9acd
fixes #687, documentation button labeling
snide bddb74e
snapshot updates
snide 1c89762
fixes #617 applies aria label to theme selector
snide a950bbd
fixes #746 applies proper label to select all checkboxes in table
snide 585bdd4
snapshots
snide af4f873
changelog
snide 76d40c6
clone element and id no longer needed for popover
snide 98b7766
more snapshots
snide File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 59 additions & 19 deletions
78
src/components/bottom_bar/__snapshots__/bottom_bar.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,75 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EuiBottomBar is rendered 1`] = ` | ||
<div | ||
aria-label="aria-label" | ||
class="euiBottomBar euiBottomBar--paddingMedium testClass1 testClass2" | ||
data-test-subj="test subject string" | ||
> | ||
Content | ||
</div> | ||
Array [ | ||
<p | ||
aria-live="assertive" | ||
class="euiScreenReaderOnly" | ||
> | ||
There is a new menu opening with page level controls at the bottom of the document. | ||
</p>, | ||
<div | ||
aria-label="aria-label" | ||
class="euiBottomBar euiBottomBar--paddingMedium testClass1 testClass2" | ||
data-test-subj="test subject string" | ||
> | ||
Content | ||
</div>, | ||
] | ||
`; | ||
|
||
exports[`EuiBottomBar props paddingSize l is rendered 1`] = ` | ||
<div | ||
class="euiBottomBar euiBottomBar--paddingLarge" | ||
/> | ||
Array [ | ||
<p | ||
aria-live="assertive" | ||
class="euiScreenReaderOnly" | ||
> | ||
There is a new menu opening with page level controls at the bottom of the document. | ||
</p>, | ||
<div | ||
class="euiBottomBar euiBottomBar--paddingLarge" | ||
/>, | ||
] | ||
`; | ||
|
||
exports[`EuiBottomBar props paddingSize m is rendered 1`] = ` | ||
<div | ||
class="euiBottomBar euiBottomBar--paddingMedium" | ||
/> | ||
Array [ | ||
<p | ||
aria-live="assertive" | ||
class="euiScreenReaderOnly" | ||
> | ||
There is a new menu opening with page level controls at the bottom of the document. | ||
</p>, | ||
<div | ||
class="euiBottomBar euiBottomBar--paddingMedium" | ||
/>, | ||
] | ||
`; | ||
|
||
exports[`EuiBottomBar props paddingSize none is rendered 1`] = ` | ||
<div | ||
class="euiBottomBar" | ||
/> | ||
Array [ | ||
<p | ||
aria-live="assertive" | ||
class="euiScreenReaderOnly" | ||
> | ||
There is a new menu opening with page level controls at the bottom of the document. | ||
</p>, | ||
<div | ||
class="euiBottomBar" | ||
/>, | ||
] | ||
`; | ||
|
||
exports[`EuiBottomBar props paddingSize s is rendered 1`] = ` | ||
<div | ||
class="euiBottomBar euiBottomBar--paddingSmall" | ||
/> | ||
Array [ | ||
<p | ||
aria-live="assertive" | ||
class="euiScreenReaderOnly" | ||
> | ||
There is a new menu opening with page level controls at the bottom of the document. | ||
</p>, | ||
<div | ||
class="euiBottomBar euiBottomBar--paddingSmall" | ||
/>, | ||
] | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types'; | |
import classNames from 'classnames'; | ||
|
||
import { EuiPortal } from '../portal'; | ||
import { EuiScreenReaderOnly } from '../accessibility'; | ||
|
||
const paddingSizeToClassNameMap = { | ||
none: null, | ||
|
@@ -32,6 +33,10 @@ export class EuiBottomBar extends Component { | |
} | ||
} | ||
|
||
handleScreenReaderFocus() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where/how is this used? |
||
this.bar.focus(); | ||
} | ||
|
||
render() { | ||
const { | ||
children, | ||
|
@@ -50,6 +55,11 @@ export class EuiBottomBar extends Component { | |
|
||
return ( | ||
<EuiPortal> | ||
<EuiScreenReaderOnly> | ||
<p aria-live="assertive"> | ||
There is a new menu opening with page level controls at the bottom of the document. | ||
</p> | ||
</EuiScreenReaderOnly> | ||
<div | ||
className={classes} | ||
ref={node => { this.bar = node; }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console.log