Problem/Motivation

In D10.4 / 10.5 Editora11y complains about a h4 tag in /user/<user id>?ed1ref=/user/<user id> because the previous level h3 was skipped.

Steps to reproduce

Open a member page on a site with with CKeditor and Editora11y installed. The accessibility information icon in the bottom right corner shows a warning about the headings not following a sequential order.

Proposed resolution

changing h4 to h3 in the tags in line 308 of /core/modules/user/user.module resolves the issue. This is the original line:

'#markup' => '<h4 class="label">' . t('Member for') . '</h4> ' . \Drupal::service('date.formatter')->formatTimeDiffSince($account->getCreatedTime()),

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#14 editoria11y_user_page_workaround.png73.52 KBfengtan

Issue fork drupal-3533586

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dgwolf created an issue. See original summary.

dgwolf’s picture

Issue summary: View changes

ankusht1515 made their first commit to this issue’s fork.

dgwolf changed the visibility of the branch 3533586-member-for-needs to hidden.

dgwolf’s picture

The related issue exhibits quite some history … and I just realized:
@ankusht1515 - my apologies for accidentally hiding the branch in #4. I was happy to see the issue being picked up by you, thanks, looked for the change you introduced, expecting a diff but not finding one. I have only beginner‘s knowledge of git, never actively use the web frontend beyond browsing for a file, and hopefully didn‘t break anything. If you can unhide it, please do so, or if only I can do this, let me know and I‘ll find out how to do it. Sorry again.

dgwolf changed the visibility of the branch 3533586-member-for-needs to active.

quietone’s picture

Version: 10.5.x-dev » 11.x-dev

If this problem was discovered on a version of Drupal that is not 11.x, add that information in the issue summary and leave the version at 11.x. In Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies. Also mentioned on the version section of the list of issue fields documentation. Thanks.

An h4 is used on 11.x as well.

dgwolf’s picture

Version: 11.x-dev » 10.5.x-dev

Will do. Thanks for the pointers.

dgwolf’s picture

Version: 10.5.x-dev » 11.x-dev

My comment from a minute ago automatically changed the Drupal version back to 10.5-dev. I've now edited the version at the top of this issue, switching it to 11.x-dev. for the whole thread, hope it will stick this time.

libbna’s picture

Hi, just checking in to confirm—can we proceed with this issue, or are we waiting for #2638250 to be merged first?

ankusht1515 changed the visibility of the branch 3533586-needs-h3-instread-h4-tag to hidden.

fengtan’s picture

Issue summary: View changes
StatusFileSize
new73.52 KB

Switching to an H3 would be great!
In the meantime I was able to work around this by listing body.path-user under Disable the scanner if these elements are detected at /admin/config/content/editoria11y:

Editoria11y user page workaround

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

sclsweb’s picture

I also support the idea of removing the heading from this altogether. In my context (no customization whatsoever of the Drupal 10 user page), the appropriate heading for this would be h2, not h3 -- exactly the point @cswilcox808 makes in Merge request !12602.

Using a span instead sounds like a good replacement to me.

jayelless’s picture

This issue may not need to be progressed if the fix on issue #2638250: The label "Member for" on user profiles is hardcoded markup that is different from other user fields is accepted.

jayelless’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs accessibility review

The other issue not sure how close it is to landing so this one could continue in the meantime. Even if it's a temporary net gain.

Thanks!