Skip to content

make escape close navigation on narrow screen - #3093

Open
Alex-Jordan wants to merge 1 commit into
openwebwork:WeBWorK-2.21from
Alex-Jordan:escape
Open

make escape close navigation on narrow screen#3093
Alex-Jordan wants to merge 1 commit into
openwebwork:WeBWorK-2.21from
Alex-Jordan:escape

Conversation

@Alex-Jordan

Copy link
Copy Markdown
Contributor

On a narrow screen, when the sidebar navigation is open, this change makes it so that the escape key closes the navigation.

From Claude:

This also replaced the ad hoc backdrop
creation/removal scattered across the click handler, resize handler, and
inline toggle logic with a single openMobileDrawer/closeMobileDrawer pair,
which incidentally fixes a latent bug where clicking the toggle button while
the drawer was already open left a stale extra backdrop in the DOM.

This was all a "medium" accessibility issue that Claude found.

Comment thread htdocs/js/System/system.js Outdated
Comment thread htdocs/js/System/system.js Outdated

@drgrice1 drgrice1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed something else that will probably need to be made inert while the sidebar is open on a narrow screen. That is the "Skip to main content" link. I noticed that if the sidebar is open, that link is still in the tab order, and if you focus it with the keyboard and hit enter it still attempts to focus the page content, and then things get weird with the tab order.

Comment thread htdocs/js/System/system.js Outdated
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Alex-Jordan

Copy link
Copy Markdown
Contributor Author

OK, I made some changes here that I think address your comments.

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

Successfully merging this pull request may close these issues.

2 participants