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

feat(select): improve screen reader support #80

Merged
merged 32 commits into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bf85a46
feat(item): improve screen reader support
phetw Nov 11, 2021
287a107
test(item): add accessibility test cases
phetw Nov 11, 2021
a0b08ba
feat(select): improvee screen reader support
phetw Nov 17, 2021
7f12f2f
docs(select): make demo select accessible
phetw Nov 17, 2021
fe638cd
Merge branch 'develop' into feat/select-a11y
wsuwt Nov 17, 2021
5ed9d8b
fix(select): it should have role select
phetw Nov 17, 2021
02043f6
fix(select): use role button and add aria-invalid
phetw Nov 22, 2021
d9c8a13
docs(select): correctly label select using aria-labelledby in demo page
phetw Nov 22, 2021
7770e59
feat(select): add Home and End key support
phetw Nov 22, 2021
ebd78c6
feat(select): use role presentation for header and divider item
phetw Nov 23, 2021
9db6739
test(select): add Home and End key navigation testing
phetw Nov 23, 2021
a83d671
Merge branch 'develop' into feat/select-a11y
wsuwt Nov 23, 2021
922cd60
test(select): update snapshots
Jidapa-Pai Nov 23, 2021
252372c
Merge branch 'feat/select-a11y' of github.com:Refinitiv/refinitiv-ui …
Jidapa-Pai Nov 23, 2021
60b9f66
test(select): fix snapshots missing role presentation
Jidapa-Pai Nov 23, 2021
b517c8e
test(select): add accessibility testing
phetw Nov 23, 2021
d663686
Merge branch 'develop' into feat/select-a11y
Jidapa-Pai Nov 25, 2021
db6b449
Merge branch 'develop' into feat/select-a11y
Jidapa-Pai Nov 26, 2021
6eb916d
refactor(select): use string enum for tab directions
phetw Nov 29, 2021
1ea2eba
Merge branch 'develop' into feat/select-a11y
wsuwt Nov 29, 2021
ec3a2dd
test: remove a11y test cases
phetw Nov 29, 2021
23cfda4
fix: add double nagation to prevent values other than boolean
phetw Nov 29, 2021
b47535d
refactor: use navigation instead of direction enum
phetw Nov 30, 2021
c65941a
Merge branch 'develop' into feat/select-a11y
wsuwt Nov 30, 2021
5f5e7c9
Merge branch 'develop' into feat/select-a11y
wsuwt Nov 30, 2021
0e85504
Merge branch 'develop' into feat/select-a11y
wsuwt Nov 30, 2021
ed46389
fix: change to more generic type defaultRole
phetw Nov 30, 2021
f6613ef
Merge remote-tracking branch 'origin/develop' into feat/select-a11y
phetw Dec 1, 2021
ea26425
refactor: use setAttribute instead of overriding AOM
phetw Dec 1, 2021
9728717
refactor: use ternary operator instead of String constructor
phetw Dec 1, 2021
9a0100b
Merge branch 'develop' into feat/select-a11y
wsuwt Dec 2, 2021
ef6dbb4
Merge branch 'develop' into feat/select-a11y
wsuwt Dec 2, 2021
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
47 changes: 25 additions & 22 deletions packages/elements/src/select/__demo__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,29 @@

<demo-block header="Grouping" tags="groups,selected">
<ef-select placeholder="Pick item..." class="short">
<ef-item value="">--Please choose an option--</ef-item>
<ef-item type="header">Drinks</ef-item>
<ef-item value="1">Cola</ef-item>
<ef-item selected value="2">Lemonade</ef-item>
<ef-item value="3">Orange Juice</ef-item>
<ef-item value="4" disabled>Apple Juice</ef-item>
<ef-item value="5">Iced Tea</ef-item>
<ef-item value="6">Water</ef-item>
<ef-item type="header">Ice Cream</ef-item>
<ef-item value="7">Vanilla</ef-item>
<ef-item value="8">Chocolate</ef-item>
<ef-item value="9">Honey &amp; Walnut</ef-item>
<ef-item value="10">Pistachio</ef-item>
<ef-item value="11">Salted Caramel</ef-item>
<ef-item value="12">Mint Choc Chip</ef-item>
<ef-item value="13">Hazelnut</ef-item>
<ef-item value="14">Strawberry</ef-item>
<ef-item value="15">Raspberry</ef-item>
<ef-item role="presentation" type="header">Drinks</ef-item>
<ef-item role="option" value="1">Cola</ef-item>
wsuwt marked this conversation as resolved.
Show resolved Hide resolved
<ef-item role="option" selected value="2">Lemonade</ef-item>
<ef-item role="option" value="3">Orange Juice</ef-item>
<ef-item role="option" value="4" disabled>Apple Juice</ef-item>
<ef-item role="option" value="5">Iced Tea</ef-item>
<ef-item role="option" value="6">Water</ef-item>
<ef-item role="presentation" type="header">Ice Cream</ef-item>
<ef-item role="option" value="7">Vanilla</ef-item>
<ef-item role="option" value="8">Chocolate</ef-item>
<ef-item role="option" value="9">Honey &amp; Walnut</ef-item>
<ef-item role="option" value="10">Pistachio</ef-item>
<ef-item role="option" value="11">Salted Caramel</ef-item>
<ef-item role="option" value="12">Mint Choc Chip</ef-item>
<ef-item role="option" value="13">Hazelnut</ef-item>
<ef-item role="option" value="14">Strawberry</ef-item>
<ef-item role="option" value="15">Raspberry</ef-item>
</ef-select>

<ef-select placeholder="Pick item" class="small">
<ef-item value="GBP" selected>GBP (£)</ef-item>
<ef-item value="EUR">EUR (€)</ef-item>
<ef-item value="USD">USD ($)</ef-item>
<ef-item value="GBP" role="option" selected>GBP (£)</ef-item>
<ef-item value="EUR" role="option">EUR (€)</ef-item>
<ef-item value="USD" role="option">USD ($)</ef-item>
</ef-select>

<custom-style>
Expand All @@ -55,7 +54,11 @@
</demo-block>

<demo-block header="Country List" tags="250+">
<ef-select id="country" placeholder="Choose country..."></ef-select>
<div>
<p id="country-label">Choose a country: </p>
<ef-select id="country" aria-labelledby="country-label country">
</ef-select>
</div>
<script>
const el = document.getElementById('country');
el.data = window.countries;
Expand Down
21 changes: 21 additions & 0 deletions packages/elements/src/select/__snapshots__/Selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
lock-position-target=""
opened=""
part="list"
role="listbox"
tabindex="-1"
with-shadow=""
>
Expand Down Expand Up @@ -61,6 +62,7 @@
lock-position-target=""
opened=""
part="list"
role="listbox"
tabindex="-1"
with-shadow=""
>
Expand Down Expand Up @@ -94,6 +96,7 @@
lock-position-target=""
opened=""
part="list"
role="listbox"
tabindex="-1"
with-shadow=""
>
Expand Down Expand Up @@ -129,6 +132,7 @@
lock-position-target=""
opened=""
part="list"
role="listbox"
tabindex="-1"
with-shadow=""
>
Expand All @@ -137,6 +141,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="presentation"
tabindex="-1"
type="header"
>
Expand All @@ -147,6 +152,7 @@
aria-selected="true"
highlighted=""
part="item"
role="option"
selected=""
tabindex="0"
>
Expand All @@ -156,6 +162,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="option"
tabindex="0"
>
</ef-item>
Expand All @@ -164,6 +171,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="presentation"
tabindex="-1"
type="divider"
>
Expand All @@ -173,6 +181,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="option"
tabindex="0"
>
</ef-item>
Expand Down Expand Up @@ -204,6 +213,7 @@
lock-position-target=""
opened=""
part="list"
role="listbox"
tabindex="-1"
with-shadow=""
>
Expand All @@ -212,6 +222,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="presentation"
tabindex="-1"
type="header"
>
Expand All @@ -222,6 +233,7 @@
aria-selected="false"
highlighted=""
part="item"
role="option"
tabindex="0"
>
</ef-item>
Expand All @@ -230,6 +242,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="option"
tabindex="0"
>
</ef-item>
Expand All @@ -238,6 +251,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="presentation"
tabindex="-1"
type="divider"
>
Expand All @@ -247,6 +261,7 @@
aria-readonly="false"
aria-selected="true"
part="item"
role="option"
selected=""
tabindex="0"
>
Expand Down Expand Up @@ -279,6 +294,7 @@
lock-position-target=""
opened=""
part="list"
role="listbox"
tabindex="-1"
with-shadow=""
>
Expand All @@ -287,6 +303,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="presentation"
tabindex="-1"
type="header"
>
Expand All @@ -297,6 +314,7 @@
aria-selected="false"
highlighted=""
part="item"
role="option"
tabindex="0"
>
</ef-item>
Expand All @@ -305,6 +323,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="option"
tabindex="0"
>
</ef-item>
Expand All @@ -313,6 +332,7 @@
aria-readonly="false"
aria-selected="false"
part="item"
role="presentation"
tabindex="-1"
type="divider"
>
Expand All @@ -322,6 +342,7 @@
aria-readonly="false"
aria-selected="true"
part="item"
role="option"
selected=""
tabindex="0"
>
Expand Down
Loading