Problem/Motivation

The Did you find webform block is always wrapped in a <section> element. Since the block title is always hidden (as per Canada.ca) there is no H2 added to the block, and this causes a WCAG validation warning. This block template file should follow a similar approach to set the wrapper element as in the related tickets.

Steps to reproduce

After you run a page with the Did you find webform on it through W3C markup validation, see warning:

Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections, or else use a div element instead for any cases where no heading is needed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nasr2000 created an issue. See original summary.

Nasr2000’s picture

Issue summary: View changes
FileSize
32.61 KB
smulvih2’s picture

Status: Needs review » Needs work

@nasr2000 the wrapping element (div/section) should be dynamic based on label variable. If label is set, use a <section>, if no label, use a <div>.

Nasr2000’s picture

@smulvih2, you are right, that's what it should be - thank you and appreciated your feedback- patch updated

Nasr2000’s picture

Status: Needs work » Needs review
Nasr2000’s picture

Nasr2000’s picture

Please ignore the patch #4

joseph.olstad’s picture

Looks good, thanks @Nasr2000 and @smulvih2

smulvih2’s picture

Patch #6 fails to apply, looks like patch file was manually updated breaking the line references (@@ xxx @@). New patch applies correctly and fixes the reported issue.

smulvih2’s picture

Title: block-find-what-you-looking-for.twig » Set dynamic wrapper element for Did you find webform block
Version: 4.2.3 » 4.3.x-dev
Category: Bug report » Feature request
Issue summary: View changes
Related issues: +#3282516: Improve block headings, +#3277101: Block headings
sylus’s picture

Status: Needs review » Fixed

Thanks everyone for looking at this and catching these issues.

Its pretty impressive how much accessibility reviews wxt_bootstrap has. :D

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

joseph.olstad’s picture