You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking to optimize the site's performance and that of the homepage specifically, the Lighthouse tool in Chromium browsers has made some suggestions. Some of these will have repercussions throughout the app so we're going to make them their own tickets.
Accessibility Recommendation: Lists do not contain only <li> elements and script supporting elements
Screen readers have a specific way of announcing lists. Ensuring proper list structure aids screen reader output. details
Overview
<ul> are not supposed to have <div> as children.
Benefit (the 80 of 80/20)
Will help screen readers and search engines read the page
Effort (the 20 of 80/20)
Minimal for this page
Moderate if other pages are affected
Complications
Is there a reason we have a UL with children that are both DIV and UL? Are both <ul><div> and <ul><ul> breaking the rules? Any reason the parent <ul> shouldn't be a <div>?
Are we doing something like this anywhere else on the site?
Valid child elements for <ul> are <li>, <script>, and <template> (mdn). (<li> content can be anything.)
I can't find a way to easily scour the site looking for <ul> children that aren't <li>—no easy way to querySelectorAll('ul > li:not')—but spot checking the 300+ instances of <ul, it doesn't seem to be a widespread issue.
There's an instance inside fec/legal/templates/legal-advisory-option.jinja that I've corrected and there's another issue in fec/fec/static/js/data/terms.json where the html is inside a string (three occurrences on line 28)
Background
Looking to optimize the site's performance and that of the homepage specifically, the Lighthouse tool in Chromium browsers has made some suggestions. Some of these will have repercussions throughout the app so we're going to make them their own tickets.
Accessibility Recommendation: Lists do not contain only
<li>
elements and script supporting elementsScreen readers have a specific way of announcing lists. Ensuring proper list structure aids screen reader output. details
Overview
<ul>
are not supposed to have<div>
as children.Benefit (the 80 of 80/20)
Will help screen readers and search engines read the page
Effort (the 20 of 80/20)
Minimal for this page
Moderate if other pages are affected
Complications
<ul><div>
and<ul><ul>
breaking the rules? Any reason the parent<ul>
shouldn't be a<div>
?Related tickets
The text was updated successfully, but these errors were encountered: