Make WordPress Core

Opened 15 years ago

Closed 3 weeks ago

Last modified 3 weeks ago

#14795 closed defect (bug) (fixed)

Twenty Ten: move skip link earlier

Reported by: anonymized_3085's profile anonymized_3085 Owned by: joedolson's profile joedolson
Milestone: 6.8 Priority: normal
Severity: normal Version: 3.0
Component: Bundled Theme Keywords: twentyten-a11y has-patch commit
Focuses: accessibility Cc:

Description

Having a skip link is good, not showing it when tabbing through the page is bad. These minor tweaks fix this and display it 'over' the header image.

Attachments (2)

screen-reader-text.patch (588 bytes) - added by anonymized_3085 15 years ago.
after-patch-twenty-ten.png (466.5 KB) - added by shailu25 3 weeks ago.
After Patch.

Download all attachments as: .zip

Change History (21)

#2 @anonymized_3085
15 years ago

Oh and ideally it shouldn't be called screen-reader-text as it is inaccurate. Sighted people who navigate using a keyboard find it useful as well.

#3 @nacin
15 years ago

  • Keywords twentyten-a11y added

#4 @iammattthomas
15 years ago

I like the idea here, but the styling isn't great -- no background, white text, full-width of the page, makes the link difficult to read, depending on the header image. Should be Helvetica to match the text in the menu, too.

#5 @anonymized_3085
15 years ago

can you confirm which browser you used? the skip link background was supposed to be restricted to the same width as the the horizontal menu.

#6 @anonymized_3085
14 years ago

I won't correct this one as #14798 supercedes it.

#7 @nacin
14 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

#8 @joedolson
4 weeks ago

  • Component changed from Accessibility to Bundled Theme
  • Focuses accessibility added
  • Milestone set to 6.8
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Type changed from enhancement to defect (bug)
  • Version set to 3.0

While going through testing the progress on #62238, I observed that Twenty Ten's skip links do not become visible and are placed in the wrong content order. While this is a very old theme, Twenty Ten does still have more than 60,000 active installations, and fixing this fundamental issue should be dealt with.

#9 @sabernhardt
4 weeks ago

  • Summary changed from Twenty Ten Theme - skip link CSS fixes to Twenty Ten: move skip link earlier

#10 @sabernhardt
4 weeks ago

  • Owner set to sabernhardt
  • Status changed from reopened to accepted

This ticket was mentioned in PR #8329 on WordPress/wordpress-develop by @sabernhardt.


4 weeks ago
#11

  • Keywords has-patch added
  • Moves the skip link immediately inside the <div id="wrapper">.
  • Adds the screen-reader-text and skip-link classes directly on the a element.
  • Adds :focus styles to fit the theme.

Trac 14795

@sabernhardt commented on PR #8329:


4 weeks ago
#12

These screenshots show the page with a header image and then without it.

Using Firefox/Windows, logged in, the skip link appears in front of the admin toolbar:

https://github.com/user-attachments/assets/9a3a32eb-bf93-451c-bec8-665243ec1f2b

https://github.com/user-attachments/assets/acb5fa2d-ceda-40b2-bc81-95005c45a73c

Using Chrome/Windows, logged out, the skip link appears in the top corner:

https://github.com/user-attachments/assets/0aee5678-699e-4659-a1f1-e44fcd8ba7e5

https://github.com/user-attachments/assets/ebb67266-4ec1-4cbd-af71-c4bf89320e46

#13 @sabernhardt
4 weeks ago

For child themes, I do not perceive any new problem due to having changes in both the header.php and style.css.

  • If a child theme replaces the main stylesheet, block-library/style.css has default .screen-reader-text:focus styles to show the skip link (with smaller text).
  • If a site replaces the main stylesheet and removes the block-library styles (for example, with the Disable Gutenberg plugin), then the skip link would not appear when focused. This hypothetical site should update the styles, but that case is no worse than the current situation without a child theme.
  • If a child theme replaces the header.php template, the custom template should be updated to fix the skip link's location and classes (if it was not done already).
Last edited 4 weeks ago by sabernhardt (previous) (diff)

This ticket was mentioned in Slack in #accessibility by nhrrob. View the logs.


3 weeks ago

#15 @shailu25
3 weeks ago

Test Report

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/8329

Environment:
WordPress - 6.8-alpha-59840
OS - Windows
Browser - Firefox
Theme: Twenty Ten
PHP - 8.2.12
Active Plugin: None

Actual Results:

  • Issue Resolved with Patch.✅

@shailu25
3 weeks ago

After Patch.

#16 @joedolson
3 weeks ago

  • Keywords commit added

I agree with you that any issues with prior customizations are minor; the only case where this could cause problems is where an extender customized the CSS, but not the HTML. But even so, this will still work; it just won't have any custom design characteristics the author might have intended.

#17 @joedolson
3 weeks ago

  • Owner changed from sabernhardt to joedolson

#18 @joedolson
3 weeks ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 59857:

Bundled Theme: A11y: Fix skip link in Twenty Ten.

Fix the source positioning of the skip link in Twenty Ten and add CSS for visibility on focus.

Props anonymized_3085, iammattthomas, joedolson, sabernhardt, shailu25, mukesh27, poena.
Fixes #14795.

@joedolson commented on PR #8329:


3 weeks ago
#19

In r59857

Note: See TracTickets for help on using tickets.