Open Bookie0 opened 6 days ago
Same here; we use a
<h3>
even if the page is missing a<h2>
For this one, the MemberGroup
is a component on the team page, which has an <h2>
in the subheader above, so the <h3>
wouldn't be considered skipping headers on the entire page.
For this one, the
MemberGroup
is a component on the team page, which has an<h2>
in the subheader above, so the<h3>
wouldn't be considered skipping headers on the entire page.
Ah I missed that, you're right! we can disregard that one then :)
Hi team, here are a few issues i've found while poking through the code that we can fix to improve accessibility and maintainability of our code:
1. Proper tags
[ ] We should use more semantic HTML and use proper tags like
<section>
or<article>
instead of so many<div>
s.<section>
tag.<article>
tags. (here)<footer>
<nav>
(and the individual links should be<li>
list items within a<ul>
)[ ] I've noticed sometimes we use
<img>
(eg: here) and sometimes we use<Image>
(eg: here).[x] I believe for FAQ accordions here, we should use the
<details>
and<summary>
tags. See this MDN article for more (https://github.com/cornell-dti/idol/pull/746)2. Headers
[x] Each page should have a
<h1>
tag https://github.com/cornell-dti/idol/pull/755page.tsx
over here, our highest header is only<h2>
<h1>
several times. Ideally, only the hero section at the top of the page should include a<h1>
[x] We shouldn't skip over headers https://github.com/cornell-dti/idol/pull/755
bottom.tsx
over here, we use a<h5>
and then a<h6>
pretty randomly, skipping over a bunch of other headers<h3>
even if the page is missing a<h2>
3. Alt text
[x] We don't need alt text for images that are decorative (but do still keep an explicit
alt=""
attribute) or that already have a label. https://github.com/cornell-dti/idol/pull/754<img>
is redundant[x] Many other instances of lacking
alt
text, like here or here inbottom.tsx
. And in many other instances throughout the website too https://github.com/cornell-dti/idol/pull/754[x] Sometimes the issue isn't missing alt text, but unprecise alt text. In general, slightly more descriptive alt text would be nice. It's good practice to specify what this image is supposed to represent (which you do well here with "Trends icon"), but could be nice as well to also describe what you see visually (in this case something like "laptop") https://github.com/cornell-dti/idol/pull/754
[x] https://github.com/cornell-dti/idol/pull/754
4. Random values
Seems like some values are sorta random.
[ ] We should try and use the standard Tailwind values
[ ] For colors, we should be using CSS variables to ensure consistency throughout our website
5. Making values constants
6. Button/link labels
7. Misc
<div>
here? We could just apply thehidden
attribute directly on the<a>
I think. Makes for cleaner, simpler code, and also means we are using less<div>
soup (lol)