Skip to content

Cannot focus on Start Over/Run Code buttons with keyboard - accessibility issue #104

@murphyqm

Description

@murphyqm

This is such a fantastic tool, particularly for teaching - thanks for all the time and effort involved in this!

Only a small change needed to make this library/framework more accessible: since semantic html isn't used for the "Start Over" and "Run Code" buttons (they are elements), they currently aren't focusable with keyboard, making it inaccessible/inoperable by keyboard navigation (can make screen-reader use difficult too!).

I've been fixing my pages by manually going in to the html that Quarto renders, and adding in tabIndex=0 to the elements: this makes these buttons focusable and allows you to use the enter key to activate the buttons!

The lines of code I edit:

<span class="btn-label-exercise-editor" tabindex="0">Start Over</span>

<span class="btn-label-exercise-editor" tabindex="0">Run Code</span>

Ideally, it should use a button element as opposed to spans/divs, but at least the above fix makes it operable!

I will have a go at fixing this but wanted to share the fix above in the meantime!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions