Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#6871 closed enhancement (fixed)

Accessibility: Update Heading Structure in Template Files

Reported by: mercime's profile mercime Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-screenshots has-patch
Cc:

Description

Headings provide structure for content in a website. However, an accessibility audit of the headings in the bp-legacy template files reveal that the headings are not correctly nested, so assistive technology such as screen readers cannot easily navigate the site. For this reason, using the proper heading structure <h1> to <h6> and correct nesting of such is essential.

This ticket will serve as a placeholder for the following files identified in the initial audit which require change in heading structures.

groups/

  • groups/create.php
  • groups/single/cover-image-header.php & groups/single/group-header.php --- required for the rest of groups templates below
  • groups/single/admin.php
  • groups/single/forum.php
  • groups/single/invites-loop.php
  • groups/single/members.php
  • groups/single/forum/edit.php
  • groups/single/forum/topic.php

members/

  • members/register.php
  • members/single/profile/change-avatar.php
  • members/single/profile/change-cover-image.php
  • members/single/profile/edit.php
  • members/single/profile/profile-loop.php
  • members/single/profile/profile-wp.php
  • members/single/groups/invites.php

forums/

  • forums/index.php

assets/

  • assets/_attachments/uploader.php

References:
WP Core Accessibility Coding Standards
W3C Content Structure
WCAG 2.0
Webaim Semantic Structure

Attachments (1)

groups-single-admin-members.png (91.9 KB) - added by mercime 8 years ago.

Download all attachments as: .zip

Change History (13)

#1 @hnla
8 years ago

@mercime
Please don't hate me for here but we sort of have always known the template files known as 'bp-legacy' are not the perfection we would like and one of the reasons I keep harping on about the necessity of creating new template files - I'm aware I may sound like a stuck record here - where we attend to aspects like this and many others without let or hindrance; not sure if the intention of this ticket is simply a reference or whether the intention is to update legacy templates, if the latter I think we may have an issue in not knowing if custom styles might have been applied e.g .moderators h5 {}

Last edited 8 years ago by hnla (previous) (diff)

#2 @boonebgorges
8 years ago

@hnla We all have been harping on about new template files for years. If we keep pushing all improvements until the day we manage to eke them out, it does two things: (1) we become paralyzed in bp-legacy, so that no improvements at all are made to the front-end BP experience, and (2) the job of creating a new template pack encompasses so many tasks that it makes it even more likely that it'll never be done.

We have made numerous changes to bp-legacy over the past couple years. In each case, we should weigh the potential for broken appearance/customization against the potential benefit. In this case, @mercime has nicely outlined the accessibility benefits.

I've asked @mercime to break out each specific change, with before and after screenshots in a couple of the twenty* themes, so that we can get a sense of just what might "break". On a screen like Group > Manage > Members, it is, IMO, highly unlikely that many people have done in-depth customizations. And in cases where they have, it's likely that they are overriding the template, in which case the point is moot. And even if the appearance does change a bit, it's unlikely that anyone will notice on such a rarely used page (especially if the change is for the better).

So, I encourage us not to dismiss out of hand the entire project of fixing header hierarchy in bp-legacy. I feel very confident that many or most of the changes proposed by @mercime are workable. It's a decision we need to make on a case-by-case basis.

#3 @hnla
8 years ago

so that we can get a sense of just what might "break"

How on earth can you judge what may break, you can't you are essentially saying change an element to another one altogether, it's impossible to know what styling might be hooked to any given element, adding elements is one thing or classes, actually changing an existing element is potentially problematic, but the point in templates probably overloaded if deep customizing performed is as always a fair one.

In respect of document outline it also needs to be remembered that BP does not 'OWN' the document, we do not describe the DOM whatsoever we inject content into a DOM structure that again we can't be sure about, so best we can do is match to WP default themes but in other themes we may encounter different heading levels, however that's less a concern as we do use headings and those should take into account themes where possible ( if WP default themes change that though outside our #buddypress namespace we're a bit stuffed but it's out of our control, so take a best fit view)

we become paralyzed in bp-legacy,...

There comes a point where you can't avoid that, bp-legacy should be retired, you can't or shouldn't consider these templates as viable for much longer.

I've asked @mercime to break out each specific change, with before and after screenshots in a couple of the twenty* themes,...

Ok must have missed that discussion.

I am not against the notion here, but we are talking about expending energy attempting to shore up something that is suboptimal and to put it crudely attempting to make a silk purse out of a sows ear :) (a bit extreme & a little unfair but illustrates a point) I would love to see this energy put towards something we can actually lovingly craft.

So, I encourage us not to dismiss out of hand the entire project of fixing header hierarchy in bp-legacy

I'm not for one minute attempting to dismiss out of hand, if it feels like that then please ignore my remarks, go ahead and make the changes the consequences will likely not be dire as you point out Boone.

@mercime when you change these elements please add classes too if lacking, in the CMS pre-factored markup paradigm all elements need classes really so styling is always hooked to a class rather than the element itself.

#4 @mercime
8 years ago

@hnla Thank you for your feedback. I share in your concern about themes using old hierarchy used when I started working on this. At this same time, we need to move forward with making the content accessible for everyone, a step at a time or via a big leap when possible.

I thank @boonebgorges for his advice and support on this matter (and many, many other sage advice) ever since I consulted with him last week about the best way to get this done and started working on the screenshots then the patches.

I would love to see this energy put towards something we can actually lovingly craft

Please let me know what you are referring to - another BP template pack, new BP theme, BP JS theme? - I'll be glad to help out. Have high energy, will assist where possible :)

when you change these elements please add classes too if lacking, in the CMS pre-factored markup paradigm all elements need classes really so styling is always hooked to a class rather than the element itself.

I will be creating tickets for each screen in a little while. Your input on each and every one is most welcome.

#5 @DJPaul
8 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.6

This ticket was mentioned in Slack in #buddypress by mercime. View the logs.


8 years ago

#7 @mercime
8 years ago

  • Keywords changed from has-screenshots, has-patch to has-screenshots has-patch
  • Milestone changed from 2.6 to Future Release

#8 @DJPaul
8 years ago

  • Component changed from General - UX/UI to Core

#9 @DJPaul
8 years ago

Did this get done recently @mercime or more? If so, update milestone please and thank you.

#10 @mercime
8 years ago

  • Milestone changed from Future Release to 2.7

Updated milestone. Thank you @DJPaul :)

#11 @mercime
7 years ago

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

#12 @mercime
7 years ago

Note: For BuddyPress Forums which use bbPress, there's a ticket filed in bbPress trac 2968 which addresses the heading hierarchy in respective template files.

Note: See TracTickets for help on using tickets.