WordPress.org

Making WordPress.org

Opened 4 months ago

Last modified 3 months ago

#3116 assigned enhancement

Support new "heading" parameter for sessions and speakers shortcodes

Reported by: mrwweb Owned by: kau-boy
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords: needs-patch, good-first-bug, accessibility
Cc:

Description

Many of the parameters for sessions and speaker shortcodes such as date or group, respectively, encourage outputting subsets of sessions or speakers. If these subsets appear on the same page, it's likely that each group is preceded by a Heading 2.

Since the default shortcode output uses Heading 2s for each title/name, this leads to an overly-flat and arguably inaccurate heading outline that decreases the site's accessibility for screen reader users. For sited users, the visually hierarchy of this is also subpar and makes it harder to scan the [usually extremely long] page.

Therefore, a new "heading" parameter (e.g. [sessions date="YYYY-MM-DD" heading="3"]) should be introduced to allow site users to output more accessible and usable markup.

Change History (7)

#1 @coreymckrill
4 months ago

  • Keywords needs-patch good-first-bug added
  • Type changed from defect to enhancement

This ticket was mentioned in Slack in #meta-wordcamp by coreymckrill. View the logs.


4 months ago

#3 @coreymckrill
4 months ago

  • Owner set to kau-boy
  • Status changed from new to assigned

#4 @iandunn
3 months ago

I think this is an important a11y issue to bring up, but I'm wondering if a shortcode param is the best option to solve it? I don't have any better ideas at the moment, but it seems like there might be a more elegant solution if we brainstorm a bit.

#5 @coreymckrill
3 months ago

We did discuss this in a recent ticket scrub (see also the link to the Slack mention above).

#6 @mrwweb
3 months ago

The solution proposed in the chat seems workable. I theoretically like a more elegant solution, but I think anything other than the shortcode parameter will likely involve unsupported edgecases. I can very quickly come up with realistic use cases for h2, h3, and h4 at a minimum. The idea of whitelisting elements mentioned in the chat makese sense. I can't think of a situation where a non-heading would be appropriate unless triggered by some other shortcode attribute that, for instance, shows speaker links in an unordered list (at which point the heading attribute is probably just ignored).

#7 @iandunn
3 months ago

  • Keywords accessibility added
Note: See TracTickets for help on using tickets.