Opened 6 years ago
Closed 5 years ago
#46899 closed defect (bug) (fixed)
Ensure that tables generated by the Settings API have no semantics
Reported by: | greatislander | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.2.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | settings-api has-patch needs-testing fixed-major |
Focuses: | accessibility, administration | Cc: |
Description
As per Slack discussion today, the <table>
element that is output by do_settings_sections()
should have a role="presentation"
attribute to remove table semantics as it is only used for layout purposes.
References:
- https://www.scottohara.me/blog/2018/05/05/hidden-vs-none.html#when-to-use-rolenonepresentation
- https://core.trac.wordpress.org/ticket/46725
Related Tickets:
Attachments (2)
Change History (20)
#3
@
6 years ago
Note regarding the ARIA 1.1 none role: In ARIA 1.1, the working group introduced none as a synonym to the presentation role, due to author confusion surrounding the intended meaning of the word "presentation" or "presentational." Many individuals erroneously consider role="presentation" to be synonymous with aria-hidden="true", and we believe role="none" conveys the actual meaning more unambiguously.
#4
@
6 years ago
@conner_bw thanks. WordPress needs to support also old browser / assistive technologies combinations that may not understand role=none
.
#5
@
6 years ago
@greatislander thanks for the patch! Worth noting 46899.diff will only have an effect on settings sections added by plugins. The core settings screens in WordPress don't use the Settings API, see #38734.
For the core tables, role="presentation"
needs to be added to all the settings pages options-general.php
, options-writing.php
, options-reading.php
, etc. plus the settings pages in the multisite part.
Note: There are other layout tables outside the settings pages (typically they have a form-table
CSS class) but I'd say they're out of the scope of this ticket.
For some background, there are various pending tickets related to the Settings API. Some of them focus on the UI part, most notably #16413, #18801, and #39441. Also, a couple years ago @flixos90 and @afercia explored improvements to the Settings API in a plugin published on GitHub see https://github.com/wpaccessibility/settings-api-enhanced.
#6
@
5 years ago
- Version trunk deleted
Removing the trunk
version, as this is not a regression in 5.2.
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
5 years ago
#8
@
5 years ago
- Component changed from Plugins to Administration
- Keywords needs-refresh added
- Milestone changed from Awaiting Review to 5.3
Discussed during today's accessibility bug-scrub and we'd like to try this for the next 5.3 release. The patch needs to b extended to other layout tables used in core.
#10
@
5 years ago
- Keywords needs-refresh removed
@afercia Updated patch to cover every other instance of <table class="form-table">
that I could find on admin settings pages.
This ticket was mentioned in Slack in #accessibility by greatislander. View the logs.
5 years ago
#12
@
5 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 45403:
#13
@
5 years ago
For history and context: the addition of role="presentation"
is a temporary improvement, pending decisions and progress on the proposal to entirely remove layout tables from WordPress. See #16413, #18801, #39441, and the explorations made on https://github.com/wpaccessibility/settings-api-enhanced.
I'm going to open a follow-up ticket to address some edge cases not covered in this ticket.
Patch from https://github.com/WordPress/WordPress/pull/401