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

Docs page code lines duplicate ids and tabstops #237

Open
SleeplessByte opened this issue Jan 9, 2025 · 1 comment
Open

Docs page code lines duplicate ids and tabstops #237

SleeplessByte opened this issue Jan 9, 2025 · 1 comment

Comments

@SleeplessByte
Copy link

Bug description

The docs page has inaccessible tables for code blocks with useless links, duplicate ids and bad experience on screen readers.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://hotwirecombobox.com/
  2. Use any screenreader and navigate the page

I've captured the output hitting the first to code "blocks" (which are tables).

table  with 1 rows and 2 columns  row 1  column 1  1  visited  link  
10   
2  visited  link  
3  visited  link  
4  visited  link  
   column 2  <%= form_with url: search_url do |form| %>

  <%= form.combobox :search, searchables_path,

        name_when_new: :search, mobile_at: "0px" %>

<% end %>

blank
out of table  blank
In views/searchables/index.turbo_stream.erb
table  with 1 rows and 2 columns  row 1  column 1  visited  link    1  

visited  link    2  

visited  link    3  

blank
column 2  <%= async_combobox_options @page.records,

      render_in: { partial: "searchables/searchable" },

      next_page: @page.last? ? nil : @page.next_param %>

blank
out of table  blank
That's it!

If the tables are going to be kept, they lack headers, the caption is not a <caption>, and the line numbers are links that don't work, because each line one links to the first line one. They are also non-descript "link 1" "link 2" link "3".

My recommendation is to remove these completely. Maybe make the headings links, but these links on linenumbers don't add value and detract usability.


P.S. I don't have big issues actually using the combobox, which is GREAT. But other experiences may differ.

@josefarias
Copy link
Owner

Thanks for calling this out! And I'm happy to learn you don't have any big accessibility issues with the combobox. My focus on accessibility has admittedly mostly been on the combobox and not the docs.

The code snippets on the docs were very much hacked together and evidently need an overhaul.

I'd be interested to learn your take on #235. I think it'll be a good change for accessibility. But probably surprising for existing users of the library.

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

No branches or pull requests

2 participants