Giter VIP home page Giter VIP logo

Comments (3)

mh-nichts avatar mh-nichts commented on September 15, 2024

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.

mynamesleon avatar mynamesleon commented on September 15, 2024

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.

mh-nichts avatar mh-nichts commented on September 15, 2024

Thanks for the change !

from aria-autocomplete.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.