Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#9 | wxt-bootstrap-dynamic-block-wrapper-did-you-find-webform-3291816-8.patch | 700 bytes | smulvih2 |
#6 | wxt-bootstrap-fix-html-validation-block-FWYL4-twig.patch | 700 bytes | Nasr2000 |
#2 | HTML-Validation.PNG | 32.61 KB | Nasr2000 |
Comments
Comment #2
Nasr2000 CreditAttribution: Nasr2000 as a volunteer and at Health Canada - HPFB commentedComment #3
smulvih2@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>
.Comment #4
Nasr2000 CreditAttribution: Nasr2000 as a volunteer and at Health Canada - HPFB commented@smulvih2, you are right, that's what it should be - thank you and appreciated your feedback- patch updated
Comment #5
Nasr2000 CreditAttribution: Nasr2000 as a volunteer and at Health Canada - HPFB commentedComment #6
Nasr2000 CreditAttribution: Nasr2000 as a volunteer and at Health Canada - HPFB commentedComment #7
Nasr2000 CreditAttribution: Nasr2000 as a volunteer and at Health Canada - HPFB commentedPlease ignore the patch #4
Comment #8
joseph.olstadLooks good, thanks @Nasr2000 and @smulvih2
Comment #9
smulvih2Patch #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.
Comment #10
smulvih2Comment #11
sylus CreditAttribution: sylus commentedThanks everyone for looking at this and catching these issues.
Its pretty impressive how much accessibility reviews wxt_bootstrap has. :D
Comment #13
joseph.olstad#3423265: D10 regression - Missing webform blocks after WxT 4.4 to 5.1 upgrade