Feature idea: label sections with slide heading content
marcysutton opened this issue · 0 comments
I added a feature to dynamically label slide section elements identify their order in the overall group: i.e., "Slide 1" or "Slide 10, child 3". That way, AT users have a way to identify a slide by a labeled landmark. However, if I was trying to identify a specific slide based on its content, "Slide 3" wouldn't be as useful.
It would be cool if the aria-label
included "Slide 1, Title of that Slide" instead of just the slide number. The Skip Links feature supports this, but the code is pretty buried in that part of the plugin. To make it reusable will require decoupling the code from Skip Links; this issue is intended to act as a reminder of work yet to be done. To be truly useful, the "slide title" content used in a section's aria-label
should also work even if there isn't a heading on the page (like when you have a single image with alt text).
Note: this entire plugin could use a refactor to be more modular and modern, but given the fact that Reveal.js isn't being updated to newer tools makes that less enticing (i.e. using imports to make it easier to include node_modules, including this plugin).