Skip to content

Commit

Permalink
fix: 🐛 improved accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vanntile committed Mar 26, 2021
1 parent 7107661 commit d2b2742
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
15 changes: 14 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"standard-version": "^9.1.1",
"stylelint-config-recommended": "^4.0.0",
"tailwindcss": "^2.0.3",
"tailwindcss-visuallyhidden": "^1.0.2",
"typescript": "4.2"
},
"scripts": {
Expand Down
17 changes: 16 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,27 @@ const IndexPage = (): JSX.Element => {
const externals = [
{
href: 'https://github.com/vanntile',
name: 'vanntile on GitHub',
d: svg.github,
},
{
href: 'https://gitlab.com/vanntile',
name: 'vanntile on GitLab',
d: svg.gitlab,
},
{
href: 'https://stackoverflow.com/users/4679160/vanntile-ianito',
name: 'vanntile on StackOverflow',
d: svg.stackoverflow,
},
{
href: 'https://dribbble.com/vanntile',
name: 'vanntile on Dribbble',
d: svg.dribbble,
},
{
href: 'https://www.linkedin.com/in/valentin-ionita',
name: 'vanntile on Linkedin',
d: svg.linkedin,
},
]
Expand Down Expand Up @@ -324,10 +329,20 @@ const IndexPage = (): JSX.Element => {
key={e.href}
href={e.href}
target="_blank"
rel="noreferrer"
title={e.name}
className={`${styles.rotateScaleUp} pseudo-none bg-gray-900 rounded-full h-12 w-12 focus:outline-none focus:ring-8 ring-brand-accent`}
>
<svg width="48px" height="48px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<svg
aria-hidden="true"
focusable="false"
width="48px"
height="48px"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path d={e.d} fill="currentColor" className="text-gray-200" />
<span className="visuallyhidden">{e.name}</span>
</svg>
</a>
))}
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ module.exports = {
},
},
variants: {},
plugins: [],
plugins: [require('tailwindcss-visuallyhidden')()],
}

0 comments on commit d2b2742

Please sign in to comment.