Menu Icon not working
the menu icon is not appearing on the right side of
log in
https://codepen.io/saad-shehzad-the-bashful/details/ZEgYeza14 Replies
You are using FontAwesome icon but you have not linked to FontAwesome as far as i can see
You need to generate a kit on fontawesome website and take the javascript link and put it in a script tag at the end of body
oh yeah my bad
tysm tok
i didnt link the kit
:sage_happy:
Don't forget to put the icon in a <button> (instead of a div) with an aria-label and ideally also aria-expanded and aria-controls.
also, if you are going to use fontawesome for that single icon, you might be better off using just the svg
or making your own
the menu is not opening
I updatred the codepen so you guys can see
i am doing this nav bar with a youtube tutorial and making this idk if it will mess thing up
will it work the same?
You will have to remove the default button bg and border but otherwise it will only make your code more accessible and semantic. Clickable things should be interactive elements whenever possible otherwise you have to do so much extra work in your JavaScript. It’s using the right tool for the job.
:welldonemate:
done
And since there’s an icon inside make sure to add an aria label or a span.visually-hidden so that people who reply on screen readers and assistive technologies /can’t see the icon have some context of what clicking the button will do
idk what did you just say :surprisingly_confused:
anyways i fixed the issue i was having with the menu
<button aria-label=“Menu”><I class=“fa fa-bars”></i></button>
no, it will be an svg instead of an <i>
this is only worth the effort if you dont have to bloat your html with a bunch of svgs
and if you only use a few icons
tysm everyone for helping me out
:yay:
you're welcome