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

accessibility error: empty container #4842

Closed
4 tasks done
mnazzaro opened this issue Jan 9, 2023 · 8 comments
Closed
4 tasks done

accessibility error: empty container #4842

mnazzaro opened this issue Jan 9, 2023 · 8 comments
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open

Comments

@mnazzaro
Copy link

mnazzaro commented Jan 9, 2023

Contribution guidelines

I want to suggest an idea and checked that ...

  • ... to my best knowledge, my idea wouldn't break something for other users
  • ... the documentation does not mention anything about my idea
  • ... there are no open or closed issues that are related to my idea

Description

This relates to a <ol> element used for search results, which is empty whenever the user is not doing a search. The <ol> has an implicit role="list" attribute, so the screen reader expects it to have list items and throws an error if it does not.

I think the simplest solution is to add role="presentation" to the <ol> by default, and then remove that role (or change it to role="list") when the user clicks into the search bar.

To test, install the SiteImprove accessibility checker for Chrome and run on any mkdocs page.

Here is a link to a simple example solution, which would need to be adapted for a PR: arXiv/arxiv-docs@0e5871d

Use Cases

This will be another accessibility win, and will make mkdocs fully compliant with SiteImprove on load.

Screenshots / Mockups

No response

@squidfunk
Copy link
Owner

Thanks for reporting. Edited for clarity. Please enclose tags with backticks, or the formatting will be jammed. Also note that errors should be bug reports, not feature requests.

@squidfunk squidfunk added the needs investigation Issue must be investigated by the maintainers label Jan 9, 2023
@mnazzaro
Copy link
Author

mnazzaro commented Jan 9, 2023

Ah sorry about the formatting. I found the bug report form requirements to be too stringent- I didn't have a zip file to upload. I'll try to make sure to do that next time.

@squidfunk
Copy link
Owner

Even though it may seem trivial to reproduce, a reproduction makes our lives as maintainers much easier. Please remember that we're providing this service free of charge, so I think it is okay for us to ask for a little cooperation 😊

@mnazzaro
Copy link
Author

Yes of course. Could that just be a zipped up mkdocs project that exhibits the issue? I wasn't sure exactly what you were looking for either

@squidfunk
Copy link
Owner

The bug reporting issue template mentions our bug reporting guide, which explains in details what we need for a bug report and why. It also links to the reproduction guide, that explains clearly how to create a reproduction with the info plugin.

If you missed that when reading our bug reporting issue template, how can we make that more clear?

@mnazzaro
Copy link
Author

Ahh I see it at the bottom. I'm sorry I didn't use it! I don't want to give you any extra work; I don't think most people would miss it. It could be helpful to just copy the link to the top, if this is a common problem, though.

My mistake, and thanks for being so responsive. Let me know if I can be of any more help on the empty container issue too.

@squidfunk
Copy link
Owner

Fixed in a200e7d. Good catch. Happy to further improve accessibility if you find further errors!

@squidfunk squidfunk added change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open and removed needs investigation Issue must be investigated by the maintainers labels Jan 14, 2023
@squidfunk
Copy link
Owner

Released as part of 9.0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants