Comments (3)
OK, I misunderstood the condition in handleComponentBlur()
: it's explicitly set to close the suggestions list when focus goes to "show all" or a selected item.
Still it would be interesting to fix isSelectedItem()
so it returns only true
or false
, because it should return a boolean.
Back to the closing of suggestions list : the accessibility issue here is for mobile/tactile devices, where explore by touch isn't very practical especially on small screens. In those cases, it's better to be able to navigate by swipe in the list. To do this, the list must either stay open until we "arrive" on it (after "show all" and selected items), or the list should be just after the text input in the HTML order.
My suggestion to handle this while keeping the original condition : move the list HTML before the selected items (instead of after). It would also be more consistent with the visual aspect, especially without autogrow : the selected items are after the input/"show all"/list.
If the "show all" button is present, the list must stay after it, to keep consistency with the disclosure pattern : if we keep closing the list on this button, there will still be a problem on mobile/tactile navigation, and then the only solution I see is not setting the showAllControl
option.
from aria-autocomplete.
Thank you for pointing this one out. I've also wondered about eventually adding an option to control where the selected items render in the DOM - before or after the input - particularly as the autoGrow
mode is styled by default to look like they're before the input and the tabbing order doesn't match that. I'll have to explore that further at a later point.
from aria-autocomplete.
Thanks for the change !
from aria-autocomplete.
Related Issues (15)
- Search by other properties in the `source` data
- Customise the List Item rendering markup
- Why empty the field on blur ? HOT 5
- Accessibility corrections HOT 5
- Add "delete all" control HOT 3
- Why remove the aria-describedby pointing to sr-assistance when the input is filled ? HOT 2
- Differentiate controls of several autocomplete on the same page HOT 3
- First selected item not announced HOT 3
- Announce instructions for touch support only if it is enabled HOT 2
- Enhancement: Allow empty Option HOT 1
- deleteAll method HOT 3
- Handling focus on input: onDelete executed whilst deletion is not complete HOT 2
- How to update or replace the list of values of an already created element? HOT 8
- Handling required attribute / error message HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aria-autocomplete.