Git Product home page Git Product logo

Comments (11)

squidfunk avatar squidfunk commented on June 12, 2024 1

I don't think it's acceptable, because this would hide it from screen readers. If would also silence the warning, but at the possible expense of a worse experience on a screen reader. I wouldn't recommend it.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 12, 2024

Thanks for reporting. The region is accessible by keyboard ☺️ Using the up and down arrows, you can navigate search results, so I'm quite confident this is a false positive.

from mkdocs-material.

jzazo avatar jzazo commented on June 12, 2024

Thanks for the feedback. I have created a follow up issue on the accessibility app:
microsoft/accessibility-insights-web#7338

I am happy to close this issue while we wait on the other project, and reopen if necessary, or leave open in the meantime. Let me know your preference, or close the issue yourself.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 12, 2024

Thanks! Yes, I believe this is a false positive in our case, but I don't think that this can or should be solved upstream, because the accessibility checker would need to execute JavaScript to learn that the search results can be navigated.

Why did we implement it that way? Because we want to keep the cursor in the input field, so the user can change the search input at any time. Making the results focusable would mean the user would have to leave the input field, and return to it to change the query – IMHO a mediocre user experience compared to what we currently have. If we can add aria-* attributes that offer indications of our impementation (i.e. why it's not tabbable), we're happy to consider.

Also note that when you tab, you'll leave the search.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 12, 2024

I'm closing this as working as intended, as explained in my last comment. In case we can improve the situation with additional aria-* attributes, please open a PR that add those attributes ✌️

from mkdocs-material.

jzazo avatar jzazo commented on June 12, 2024

Do you think adding something like aria-hidden="true" would be acceptable? Could it remove the false positive, as it is being handled differently than the checker expects?

from mkdocs-material.

jzazo avatar jzazo commented on June 12, 2024

One thing I did not correctly understand (that you may have explained). Adding tabindex="0" to the div section removes the false positive. Correcting this issue manually, I don't think the experience changes. I can start typing, use the keyboard to select some line, and continue typing without losing focus. I am not sure if adding the expression I put, alters the behavior at all, but can solve for the false positive, don't you agree?

from mkdocs-material.

squidfunk avatar squidfunk commented on June 12, 2024

I'm not sure if this generalizes to all browsers. For instance, in my experience, Safari has completely different tabbing semantics than Chrome. Thus, I'm not entirely sure that this change is safe to make.

from mkdocs-material.

jzazo avatar jzazo commented on June 12, 2024

so I was able to test this solution on Firefox, Edge and Safari, and they all behaved the same when typing a command, using arrow keys to navigate the menu, and then continue typing, without losing focus. To test this I modified the div section to <div class="md-search__scrollwrap" tabindex="0">. So I don't think it broke the experience in any of those browsers.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 12, 2024

Thanks for taking the time to test this. You can create a PR if you like.

from mkdocs-material.

Related Issues (20)

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.