#33559 closed defect (bug) (fixed)
#a11y-headings - WordPress Updates headings fixes
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Administration | Keywords: | has-patch |
Focuses: | ui, accessibility | Cc: |
Description
A number of H3 headings on this page need to be bumped up to H2s:
- "An updated version of WordPress is available"
- "You have the latest version of WordPress. Future security updates will be applied automatically."
- "Plugins"
- "Themes"
- "Translations"
Also need to ensure that any design (fontsize, colour, etc) is properly maintained when swapping the headings.
#a11y-headings
Attachments (5)
Change History (25)
This ticket was mentioned in Slack in #accessibility by cheffheid. View the logs.
10 years ago
#4
@
10 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 33817:
#5
@
9 years ago
- Focuses ui added
- Resolution fixed deleted
- Status changed from closed to reopened
We should still keep the styling for the H2 headings that were removed in [33817] to account for plugins that still use H2 as main headings in their screens. We should probably pair the styling with the current .wrap h1
maybe making it more specific for example .wrap > h2
.
Without this, many plugins screens will look like this:
while the correct styling should look like this:
#6
@
9 years ago
The new patch tries to pair the main h1 heading style with .wrap > h2
to take into account plugins that still use a h2
heading in their screens.
This ticket was mentioned in Slack in #core by afercia. View the logs.
9 years ago
#8
@
9 years ago
Hm as @Cheffheid pointed out this won't work in some edge cases, for example update-core.php
and user-new.php
on multisite. Maybe we should use instead. Maybe better :first-child :) Investigating..wrap + h2
#9
follow-up:
↓ 13
@
9 years ago
Discussed a bit this with @Cheffheid on Slack and we have a couple of options:
- Use JavaScript, see what's already in
common.js
:
// Back compatibility: if there is no H1, apply to first H2. if ( ! $firstHeading.length ) { $firstHeading = $( '.wrap h2:first' ); }
and just add a CSS class to style the first H2. The advantage of this solution is that it will cover all the possible cases of h2
as main heading when there's no h1
. We'd prefer a CSS solution though.
- Use just CSS and provide a reasonable back compatibility for plugins that still use a H2. We won't be able to cover all the edge cases but maybe we shouldn't try to do that. Sooner or later plugins should update their main heading and use a H1.
We'd propose to style the old H2
s only if they're the :first-child
of the .wrap
container. Any thoughts and suggestions more than welcome.
A couple of edge case examples:
Plugins that use some old code before the main heading:
Notices that are displayed before the main heading and then moved below with JavaScript: for a few milliseconds the main h2 will be styled as h2 and then as h1 after the notice gets moved down:
This ticket was mentioned in Slack in #core by afercia. View the logs.
9 years ago
This ticket was mentioned in Slack in #accessibility by cheffheid. View the logs.
9 years ago
#13
in reply to:
↑ 9
@
9 years ago
Replying to afercia:
We'd propose to style the old
H2
s only if they're the:first-child
of the.wrap
container. Any thoughts and suggestions more than welcome.
I'm fine with not trying to account for all the edge cases.
Let's also add a comment that these styles are for backwards compatibility only.
#14
follow-up:
↓ 18
@
9 years ago
Refreshed patch introduces .wrap > h2:first-child
for back compatibility with plugins that still use a h2
as main heading in their screens. As agreed, this won't cover all the edge cases.
Adjusted also the h2.nav-tab-wrapper
and the tagcloud h2
headings. I think after [33355] there's no h1.nav-tab-wrapper
in the admin, keeping it just for back compatibility with plugins.
Testing and feedback more than welcome.
This ticket was mentioned in Slack in #core by afercia. View the logs.
9 years ago
#18
in reply to:
↑ 14
@
9 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to afercia:
Adjusted also the
h2.nav-tab-wrapper
Noticed some plugins provide the "navigation tab" as first H2 heading in their screens so maybe we should tweak a bit the CSS, just to override .wrap > h2:first-child
Bumps headings up to h2 and fixes styles - these CSS changes should help with maintaining the look on other h3 to h2 changes.