-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PR feedback] Docs & Comments & Updates styles for EuiScreenReaderOnly
cee-chen#2 * [Docs] Updated Accessiblity Utility pages with more nuances about EuiScreenReaderOnly * Remove `euiScreenReaderOnly` mixin from checkbox and radio styles in favor of always having the input * Commented Sass * [EuiLink] Position relative if `target=_blank` for positioning screen reader text
- Loading branch information
Showing
9 changed files
with
220 additions
and
148 deletions.
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
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,51 +1,16 @@ | ||
import React from 'react'; | ||
|
||
import { EuiScreenReaderOnly } from '../../../../src/components/accessibility/screen_reader'; | ||
import { EuiCallOut } from '../../../../src/components/call_out'; | ||
import { EuiText } from '../../../../src/components/text'; | ||
import { EuiTitle } from '../../../../src/components/title'; | ||
import { EuiLink } from '../../../../src/components/link'; | ||
import { EuiScreenReaderOnly, EuiText } from '../../../../src/components'; | ||
|
||
export default () => ( | ||
<div> | ||
<EuiText> | ||
<EuiTitle size="xxs"> | ||
<h3>Visually hide content</h3> | ||
</EuiTitle> | ||
<EuiText> | ||
<p>This is the first paragraph. It is visible to all.</p> | ||
<EuiScreenReaderOnly> | ||
<p> | ||
<em> | ||
Use a screenreader to verify that there is a second paragraph in this | ||
example: | ||
</em> | ||
This is the second paragraph. It is hidden for sighted users but visible | ||
to screen readers. | ||
</p> | ||
<p>This is the first paragraph. It is visible to all.</p> | ||
<EuiScreenReaderOnly> | ||
<p> | ||
This is the second paragraph. It is hidden for sighted users but | ||
visible to screen readers. | ||
</p> | ||
</EuiScreenReaderOnly> | ||
<p>This is the third paragraph. It is visible to all.</p> | ||
<EuiTitle size="xxs"> | ||
<h4>Show on focus</h4> | ||
</EuiTitle> | ||
<p> | ||
<em> | ||
Tab through this section with your keyboard to display a ‘Skip | ||
navigation’ link: | ||
</em> | ||
</p> | ||
<p> | ||
This link is visible to all on focus:{' '} | ||
<EuiScreenReaderOnly showOnFocus> | ||
<EuiLink href="#">Skip navigation</EuiLink> | ||
</EuiScreenReaderOnly> | ||
</p> | ||
<EuiCallOut | ||
size="s" | ||
title="For a fully styled ‘Skip to main content’ solution, see the EuiSkipLink component in the next section." | ||
iconType="iInCircle" | ||
/> | ||
</EuiText> | ||
</div> | ||
</EuiScreenReaderOnly> | ||
<p>This is the third paragraph. It is visible to all.</p> | ||
</EuiText> | ||
); |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
EuiScreenReaderOnly, | ||
EuiText, | ||
EuiLink, | ||
} from '../../../../src/components'; | ||
|
||
export default () => ( | ||
<EuiText> | ||
<p> | ||
Without relative position:{' '} | ||
<EuiLink href="#/utilities/accessibility"> | ||
Link text{' '} | ||
<EuiScreenReaderOnly> | ||
<span>has screen reader text</span> | ||
</EuiScreenReaderOnly> | ||
</EuiLink> | ||
</p> | ||
<p> | ||
With releative position:{' '} | ||
<EuiLink | ||
style={{ position: 'relative' }} | ||
href="#/utilities/accessibility" | ||
> | ||
Link text{' '} | ||
<EuiScreenReaderOnly> | ||
<span>has screen reader text</span> | ||
</EuiScreenReaderOnly> | ||
</EuiLink> | ||
</p> | ||
</EuiText> | ||
); |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
EuiScreenReaderOnly, | ||
EuiText, | ||
EuiLink, | ||
} from '../../../../src/components'; | ||
|
||
export default () => ( | ||
<EuiText> | ||
<p> | ||
This link is visible to all on focus:{' '} | ||
<EuiScreenReaderOnly showOnFocus> | ||
<EuiLink href="#/utilities/accessibility">Link text</EuiLink> | ||
</EuiScreenReaderOnly> | ||
</p> | ||
</EuiText> | ||
); |
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.