WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#6914 closed enhancement (fixed)

Add ARIA markup for required fields

Reported by: MarcoZ Owned by: westi
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

Using ARIA (Accessible Rich Internet Applications) markup, it is possible to enhance WordPress' accessibility to indicate the "required" state of certain form fields. This is currently indicated visually through styling, and through adding an abbr with title "required" and a * as plain text. But using ARIA markup, screen readers that support this can do more with explicit state "required" for the form field accessibles, for example play a certain sound or the like.

ARIA is unintrusive: If a browser is used such as IE 7 or Safari, ARIA markup won't interfere, it will simply be ignored. Browsers however, that support the WAI-ARIA markup already, will automatically use the extra information, and as more browsers become available, they'll pick it up automatically as well.

Attachments (1)

wp-6914.diff (11.9 KB) - added by MarcoZ 7 years ago.
Add aria-required attribute to fields that are styled with the form-required style, or whose required state is indicated by an array parameter.

Download all attachments as: .zip

Change History (8)

@MarcoZ7 years ago

Add aria-required attribute to fields that are styled with the form-required style, or whose required state is indicated by an array parameter.

comment:1 @MarcoZ7 years ago

  • Keywords has-patch added

comment:2 @westi7 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

comment:3 @westi7 years ago

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

(In [7888]) Add ARIA markup for required fields. Fixes #6914 props MarcoZ.

comment:4 follow-up: @Nazgul7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This breaks XHTML validation.

The attribute "aria-required" is marked as an attribute that is not supported by the document type used. (XHTML 1.0 Transitional)

comment:5 in reply to: ↑ 4 ; follow-up: @MarcoZ7 years ago

Replying to Nazgul:

This breaks XHTML validation.

The attribute "aria-required" is marked as an attribute that is not supported by the document type used. (XHTML 1.0 Transitional)

I'm currently trying to find out how to solve this. Will get back asap.

comment:6 in reply to: ↑ 5 @DD327 years ago

Replying to MarcoZ:

Replying to Nazgul:

This breaks XHTML validation.

The attribute "aria-required" is marked as an attribute that is not supported by the document type used. (XHTML 1.0 Transitional)

I'm currently trying to find out how to solve this. Will get back asap.

I dont think there is a way to solve it and keep the same Doctype from my quick reading.

Using Namespaces would've solved the XHTML Validation AFAIK, however, They're[Mozilla] not wanting to support that method in FF3.

I personally think its either Break Validation, Or support a not-yet-standard which is implemented by 1 browser. But i admitably havnt looked too far into it.

comment:7 @westi7 years ago

  • Component changed from General to Administration
  • Resolution set to fixed
  • Status changed from reopened to closed

I think the best solution here is to be ahead of the curve and get better support for screen-readers into WordPress - leading in this area is something we should aspire to.

Reading through the W3C docs it looks like they have identified the validation issue and are working on a solution - http://www.w3.org/TR/wai-aria-primer/#ariahtml

I have opened a new ticket to track the validation issue - #6918

Note: See TracTickets for help on using tickets.