Skip to content

Conversation

@YueyingLu
Copy link
Member

@YueyingLu YueyingLu commented Dec 1, 2022

Description

When open the select with filtering, focus should stays in the input, until up/down arrow key is pressed. So that screen readers can recognise and announce combobox.
For other select without filtering, focus should go to selected item when it opens, as it is.

Related links, issue AWSUI-18955

How has this been tested?

Added unit test
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Dec 1, 2022

Codecov Report

Base: 92.38% // Head: 92.41% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (1e39d8d) compared to base (d10dba7).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #543      +/-   ##
==========================================
+ Coverage   92.38%   92.41%   +0.03%     
==========================================
  Files         569      569              
  Lines       16218    16213       -5     
  Branches     4433     4433              
==========================================
+ Hits        14983    14984       +1     
+ Misses       1151     1145       -6     
  Partials       84       84              
Impacted Files Coverage Δ
src/select/utils/use-select.ts 94.85% <100.00%> (ø)
src/code-editor/index.tsx 87.30% <0.00%> (-0.20%) ⬇️
src/internal/components/dropdown/index.tsx 92.30% <0.00%> (-0.09%) ⬇️
src/property-filter/token.tsx 100.00% <0.00%> (ø)
src/internal/components/dropdown-status/index.tsx 100.00% <0.00%> (ø)
src/internal/components/filtering-token/index.tsx 100.00% <0.00%> (ø)
src/date-range-picker/index.tsx 99.03% <0.00%> (+0.96%) ⬆️
src/button-dropdown/internal.tsx 100.00% <0.00%> (+1.38%) ⬆️
...rnal/components/options-list/utils/use-keyboard.ts 100.00% <0.00%> (+7.14%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@YueyingLu YueyingLu changed the title feat: Focus does not move the selected item when open select or multi… feat: Focus stays in the input on opening select or multiselect with filter input Dec 1, 2022
@YueyingLu YueyingLu marked this pull request as ready for review December 2, 2022 10:35
@YueyingLu YueyingLu requested a review from a team as a code owner December 2, 2022 10:35
@YueyingLu YueyingLu requested review from avinashbot and removed request for a team December 2, 2022 10:35
@YueyingLu YueyingLu merged commit e52b6f6 into main Dec 6, 2022
@YueyingLu YueyingLu deleted the select-with-filter-focus-on-open branch December 6, 2022 12:49
rubencarvalho pushed a commit that referenced this pull request Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants