Skip to content

Swapping icons to Font Awesome, improves icon accessibility #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2021

Conversation

mattxwang
Copy link
Member

Concisely, this PR does a couple of things:

  • we install Font Awesome and its related react dependencies
  • we replace all SVG icons (social media + committee logos) with Font Awesome icons (individual imports w/ tree-shaking)
  • we add aria-label tags to make icon links accessible
  • we delete now-irrelevant CSS + icons from the public/ folder

This PR is related to three issues:

The components/pages we hit are:

  • the footer's dark <SocialMedia/> CTA, which is on every page - needed to also adjust some in specific CSS
  • the light <SocialMedia/> CTAs on the home page and the about page
  • the committees page (swapping out committee logo links for a link icon)
  • the event page (by swapping out an icon in favour of text)

And some other relevant notes:

  • I took a bit of liberty in adjusting what I felt were unclear links (i.e. changing a committee logo to a link logo for the website, removing the YouTube link on events in favour of the word, etc.)
  • I also changed link hover behaviour: instead of previously applying a very small scale-up (1.02), I change the color of the link. I feel that this is easier to see (and thus more accessible), plus causes less layout jank.
  • FA resolves all the weird SVG issues (notably, the Discord icon)
  • compared to a full-on rewrite (which may come down the line), this PR looks to do in-place refactoring. Notably, I don't create any new (external) components (i.e. a unified icon-link). This is something we could explore down the line, but I didn't want to bloat this PR.

Let me know what y'all think 😊

@mattxwang mattxwang requested a review from a team May 12, 2021 23:51
@mattxwang mattxwang changed the title Swapping Icons to Font Awesome, improves icon accessibility Swapping icons to Font Awesome, improves icon accessibility May 12, 2021
Copy link
Contributor

@dtjanaka dtjanaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattxwang mattxwang requested a review from a team May 13, 2021 04:05
Copy link
Member

@evanzhong evanzhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crispy

I like how much file clutter this PR reduces and there are some weird ways we've done things that have been refactored out by the changes in this PR.

Left one clarifying comment

@@ -13,7 +13,7 @@ function Footer(){
</div>
<div className="footer-item">
<h3>Reach us at</h3>
<a href="mailto: [email protected]" className="email"><span>[email protected]</span></a>
<a href="mailto: [email protected]" className="email"><span className="footer-text">[email protected]</span></a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious what the forcing function is for this change

Copy link
Member Author

@mattxwang mattxwang May 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great q! It's because there's a very generic span selector in this line of this file that was being applied to the buttons inadvertently, so I specified it. There's no impact on the final render for the non-icons.

@mattxwang
Copy link
Member Author

Thanks for the reviews y'all ❤️

@mattxwang mattxwang merged commit 6111868 into master May 13, 2021
@mattxwang mattxwang deleted the swap-icons-to-font-awesome branch May 13, 2021 04:59
mattxwang added a commit that referenced this pull request May 13, 2021
This PR does a couple of things:

* update `react-scripts` (the package for create-react-app) to `v4.0.3` - this is a major breaking change, but also helps with #130 
* update `eslint` to v7+, to resolve newly-created peer-dependency mismatches 
* removes some unused CSS I forgot to remove from #148 
* changes the about diamond to a `src/assets`-imported image rather than using a `background-image` hack (the nice externality is that it's also more accessible)!

Closes #136.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch (Social Media) Icons over to Font Awesome Icon links are inaccessible
3 participants