Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#29358 closed defect (bug) (fixed)

Remove the 'accesskey` attributes from Quicktags buttons

Reported by: azaozz's profile azaozz Owned by: azaozz's profile azaozz
Milestone: 4.1 Priority: normal
Severity: normal Version:
Component: Editor Keywords: early
Focuses: accessibility Cc:

Description

When there are several instances of Quicktags on the page, using the "accesskey" shortcut will focus the corresponding button in the last instance, even if it's not visible. As far as I see there is no way to choose the instance or limit this.

These shortcuts also interfere with some of the TinyMCE shortcuts despite that the iframe document is focused (at least in Chrome).

Change History (7)

#1 @azaozz
9 years ago

  • Focuses accessibility added
  • Keywords 2nd-opinion added

#2 @joedolson
9 years ago

Accesskey is a major accessibility problem, in general. It's a badly implemented browser feature, and I'd definitely recommend removing them all in all cases.

#3 @azaozz
9 years ago

  • Keywords early added; 2nd-opinion removed

#4 in reply to: ↑ description @afercia
9 years ago

Replying to azaozz:

When there are several instances of Quicktags on the page, using the "accesskey" shortcut will focus the corresponding button in the last instance, even if it's not visible.

Spent a whole day investigating on this :) and then came across this ticket.
Things are even trickier: Chrome will always try to activate the last instance but other browsers behave differently. Here's what happens in different browsers when two or more elements share the same accesskey value. That post is a bit old (2010) but still relevant and what applies to "Safari" it's valid for Chrome too.

Btw what's described there it's just the basic behavior. I've run some tests and when elements are hidden or cloned things get weirder and weirder especially in Firefox.

I'd definitely agree with @joedolson: remove them all, consider to implement instead keyboard shortcuts that match the ones used in TinyMCE (but is it worth?).

Accesskeys may be useful (and it's still a matter of debate between experts) just when limited to a very small (no more than 4-5), easy to remember, set of main actions that are consistent across an application and when numeric values are used to reduce conflicts, for example:
0: Help
1: Skip to content
2: Navigation
3: Search
but any different use should be avoided anywhere.
Not to mention that using letters leads to language issues: for example, "b" and "i" suggest "bold" and "italic" but just for English speakers.

#5 @azaozz
9 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 29878:

Quicktags: remove accesskey attributes the buttons and don't add empty title attributes, fixes #29358

#6 @SergeyBiryukov
9 years ago

  • Milestone changed from Future Release to 4.1

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


9 years ago

Note: See TracTickets for help on using tickets.