wshito / asciidoctor-chunker

The utility to create chunked HTML files from the single HTML generated by Asciidoctor.
MIT License
25 stars 7 forks source link

Accessibility labels on chunker navigation #14

Closed oddhack closed 3 years ago

oddhack commented 3 years ago

We have an outstanding request to make the left/right navigation arrows added by the chunker usable via screen reader:

Would it be possible to add aria-label="Next Page" and aria-label="Previous page", or something similar, to these two buttons?

I'm not sure if this would be done by tweaking src/DOM.mjs directly? Possibly we could do this with custom CSS but it seems like a generally useful change in the chunker output.

wshito commented 3 years ago

@oddhack Thank you for pointing out the accessibility support. I have just added the arial-label as well as the keyboard shortcuts with arrow keys. Please check the latest release.

You can also see the sample from here.

oddhack commented 3 years ago

Thanks! This looks great and I really appreciate the rapid update. It is possible we will have a few more accessibility suggestions downstream as we have Khronos folks doing a site review at present - will let you know if anything else turns up.

adam-sawicki-a commented 2 years ago

I noticed that recently the chunked online HTML documentation https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/index.html started capturing left/right keys for opening previous/next chapter. I think this is a bad idea.

My use case is that I select some text (I use Chrome browser) and I want to narrow/extend the selection by using Ctrl+Shift+Left/Right keys. It used to work before.

Regardless of use case, I think that reloading the entire page to previous/next chapter is a rarely needed command that should not be assigned to simply left/right keys. Maybe it would be better to put some "<< Previous | Next >>" links at the beginning and end of each chapter page?

(Moved from https://github.com/KhronosGroup/Vulkan-Docs/issues/1734)