Both of the following links seem to indicate that the "Skip to main content" link should be at the top of the page and before the navigation, but we've put it in the nav element. https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/skip-to-main-content/ https://www.w3.org/TR/WCAG20-TECHS/G1.html I've mostly noticed this because I'm adding content above the nav bar and it's causing the "Skip to main content" button to display incorrectly.
Created attachment 121442 [details] [review] Bug 28469: Move "Skip to main content" to top of OPAC page This patch moves the "Skip to main content" button out of the nav element and to the top of the <body> element, so that it's the first (potentially) viewable element on the page. This means you can inject content above the navbar, which has a relative position, and it won't disrupt the display of the "Skip to main content" button. To test: 1) Apply patch 2) Same test plan as Bug 22807: Go to any page in the OPAC and hit the tab key. The "Skip to main content" link should appear. Tabbing away from it should cause the link to hide. Hitting the ENTER key when the link is highlighted should cause the page to scroll to the main content.
Added our two accessibility advocates to take a look at this. It seems like a reasonable change to me.. honestly I can't remember why I put it within the nav in the first place...
Created attachment 121464 [details] [review] Bug 28469: Move "Skip to main content" to top of OPAC page This patch moves the "Skip to main content" button out of the nav element and to the top of the <body> element, so that it's the first (potentially) viewable element on the page. This means you can inject content above the navbar, which has a relative position, and it won't disrupt the display of the "Skip to main content" button. To test: 1) Apply patch 2) Same test plan as Bug 22807: Go to any page in the OPAC and hit the tab key. The "Skip to main content" link should appear. Tabbing away from it should cause the link to hide. Hitting the ENTER key when the link is highlighted should cause the page to scroll to the main content. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nice! Works good and is much better if you'd like to insert content above the navbar. I used this jQuery to test: $('<div>TEST</div>').insertBefore( $('.navbar') )
Thanks for adding that test, Lucas!
Created attachment 121468 [details] [review] Bug 28469: Move "Skip to main content" to top of OPAC page This patch moves the "Skip to main content" button out of the nav element and to the top of the <body> element, so that it's the first (potentially) viewable element on the page. This means you can inject content above the navbar, which has a relative position, and it won't disrupt the display of the "Skip to main content" button. To test: 1) Apply patch 2) Same test plan as Bug 22807: Go to any page in the OPAC and hit the tab key. The "Skip to main content" link should appear. Tabbing away from it should cause the link to hide. Hitting the ENTER key when the link is highlighted should cause the page to scroll to the main content. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Created attachment 123146 [details] [review] Bug 28469: Move "Skip to main content" to top of OPAC page This patch moves the "Skip to main content" button out of the nav element and to the top of the <body> element, so that it's the first (potentially) viewable element on the page. This means you can inject content above the navbar, which has a relative position, and it won't disrupt the display of the "Skip to main content" button. To test: 1) Apply patch 2) Same test plan as Bug 22807: Go to any page in the OPAC and hit the tab key. The "Skip to main content" link should appear. Tabbing away from it should cause the link to hide. Hitting the ENTER key when the link is highlighted should cause the page to scroll to the main content. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 21.11, thanks to everybody involved!
Backported to 21.05.x for 21.05.03
Pushed to 20.11.x for 20.11.09
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.