Hi again
You have the same issues with scss as your previous challenge here so definitely fix that
The button border radiuses don't quite match the design
The html is better but there are still some important changes needed
- don't capitalise text in html, use css to change casing instead. Some screenreaders will read out capitalises html text as acronyms instead of reading thme word (so SUVs would be fine, SEDANS would not)
- look up how and when to write alt text on images. These icons are decorative so should not have alt values like this. If they were meaningful images their alt would need to be a description of what the image looks like
Nice that you've tried to add a flourish to the attribution but if you do that it needs to be accessible. This is not.
- clicks to toggle content would have to be on a button not a non-interactive element like an image
- the button would need aria-expanded value to toggle
- content would need aria-live attribute
- content design would need to meet minimum color contrast ratio requirements
- button would need hover AND an obvious focus-visible style (all interactive elements need this actually so that keyboard users know where they are on the page)
The js on this has been overcomplicated tbh. All it needs to do is toggle a class on click and toggle the aria expanded attribute once that's added to the button. There is no need for a counter.
It's also a common good practice to use querySelector with js- prefixed classes as the javascript element selectors instead of selecting by ID. Eg a class of js-author-toggle would tell any developer reading the html that there is some js behaviour on that element.
Marked as helpful
@Marvin-Erazo
Posted
@grace-snow i recently read your last feedback, you're right, i try to fix it in other challenges, i want to be better. Can you help me with some pages about to do a accesible buttons? thanks so much for the feedback you're the best