Making WordPress.org

Opened 9 years ago

Closed 9 years ago

#1289 closed enhancement (fixed)

Accessibility of Read More Link in WordCamp Base Redux v2

Reported by: pixolin's profile pixolin Owned by: iandunn's profile iandunn
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords: has-patch
Cc:

Description

Hello,

to (slightly) improve a11y I would like to see some assistive text for screen readers added to WordCamp base theme Redux v2:

In content.php I added

the_title( '<span class="assistive-text">', '</span> ', false )

using the already existing class .assistive-text, which hides the title when the webpage is viewed in a browser.

No changes were made in content-page.php or content-single.php, as the Read More Link isn't used when a post or page is viewed in a "single view".

To make read more links accessible in search results and archives i also added

'<span class="assistive-text">' . get_the_title() . '</span> '

in function twentyten_continue_reading_link, used in file lib/utils/twentyten-functions.php.

While the theme would need more changes to make it fully accessible (e.g. only using only one <h1> tag for every web page), I wanted to keep it backwards compatible to not break sites already using the theme. At least this patch may be a little improvement towards more a11y.

The code basically reflects the a11y team's theme patterns.

Attachments (1)

redux_v2_a11y.diff (1.7 KB) - added by pixolin 9 years ago.
Patch to enhance a11y for WordCamp Base Theme Redux v2

Download all attachments as: .zip

Change History (3)

@pixolin
9 years ago

Patch to enhance a11y for WordCamp Base Theme Redux v2

#1 @iandunn
9 years ago

  • Owner set to iandunn
  • Status changed from new to accepted

I'll take a closer look when I have a bit more time this week, but at first glance it looks pretty good. Thanks Bego :)

#2 @iandunn
9 years ago

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

In 1950:

WordCamp Base: Add post titles to Continue Reading links for screen readers.

Fixes #1289
Props pixolin

Note: See TracTickets for help on using tickets.