-
-
Notifications
You must be signed in to change notification settings - Fork 765
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
fix: improve docs pages accessibility #1464
fix: improve docs pages accessibility #1464
Conversation
✅ Deploy Preview for asyncapi-website ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-1464--asyncapi-website.netlify.app/ |
8e581d5
to
89105fd
Compare
89105fd
to
a90b3c0
Compare
@@ -84,7 +84,7 @@ export default function Feedback(className = '') { | |||
return ( | |||
<div className={`flex flex-col rounded-md shadow-md border border-gray-200 p-4 ${className}`}> | |||
<div className='flex flex-row'> | |||
<img src="/img/illustrations/icons/icon.svg" className='w-28 md:w-14' /> | |||
<img src="/img/illustrations/icons/icon.svg" className='w-28 md:w-14' alt="" aria-hidden="true" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why empty alt=""
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it blank because the image looks like it's for purely decoration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember we need to be WCAG compliant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The WCAG explanation for decorative images is to use empty alt instead of not providing it at all.
https://www.w3.org/WAI/tutorials/images/decorative/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
components/Footer.js
Outdated
@@ -17,7 +17,7 @@ export default function Footer() { | |||
<div className="mr-14 w-full md:w-auto"> | |||
<div className=""> | |||
<Link href="/"> | |||
<a className="cursor-pointer"> | |||
<a className="cursor-pointer" aria-label="AsyncAPI homepage"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a className="cursor-pointer" aria-label="AsyncAPI homepage"> | |
<a className="cursor-pointer" aria-label="AsyncAPI"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but aria-label="AsyncAPI"
reads as: "AsyncAPI link". It doesn't really show that it's going to the homepage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
homepage
sounds bit off. We currently do not have any specific route known as /home
. Better to use AsyncAPI
. The interpretation will AsyncAPI Link, that itself communicates the link will open the root route of the asyncapi
@Olaleye-Blessing
components/buttons/GitHubIssue.js
Outdated
@@ -3,7 +3,7 @@ import React from 'react' | |||
export default function GitHubIssue({className=''}) { | |||
return ( | |||
<a className={`bg-black text-white flex flex-row lg:w-6/12 shadow-md hover:shadow-lg transition-all duration-500 ease-in-out py-2 rounded justify-center ${className}`} href='https://github.com/asyncapi/website/issues/new?assignees=alequetzalli+-&labels=%F0%9F%93%91+docs&template=docs.yml&title=%5B%F0%9F%93%91+Docs%5D%3A+' target='_blank' rel='noopener noreferrer'> | |||
<img src='/img/logos/github-fill.svg' className='mr-2' /> | |||
<img src='/img/logos/github-fill.svg' className='mr-2' alt="Github logo" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead use
<img src='/img/logos/github-fill.svg' className='mr-2' alt="Github logo" /> | |
<img src='/img/logos/github-fill.svg' className='mr-2' alt="Github:AsyncAPI" /> |
<SearchButton className="flex items-center text-left space-x-2 p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out"> | ||
<SearchButton | ||
className="flex items-center text-left space-x-2 p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out" | ||
aria-label="Open Algolia Search Modal" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aria-label="Open Algolia Search Modal" | |
aria-label="Search in AsyncAPI" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like Search in AsyncAPI
sounds like the button is the one making the search, whereas it's opening a modal for the search.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This button is for search via opening modal, henceforth my suggestion will be
"Open Search"
Avoid using algolia.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! I see. "Algolia" is really not necessary.
components/navigation/NavBar.js
Outdated
@@ -58,7 +58,7 @@ export default function NavBar({ | |||
<div className="lg:w-auto lg:flex-1"> | |||
<div className="flex"> | |||
<Link href="/"> | |||
<a className="cursor-pointer"> | |||
<a className="cursor-pointer" aria-label="AsyncAPI homepage"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a className="cursor-pointer" aria-label="AsyncAPI homepage"> | |
<a className="cursor-pointer" aria-label="AsyncAPI"> |
components/navigation/NavBar.js
Outdated
@@ -69,6 +69,7 @@ export default function NavBar({ | |||
<div className="flex flex-row items-center justify-center -mr-2 -my-2 lg:hidden"> | |||
<SearchButton | |||
className="flex items-center text-left space-x-2 p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out" | |||
aria-label="Open Algolia Search Modal" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aria-label="Open Algolia Search Modal" | |
aria-label="Search in AsyncAPI" |
components/navigation/NavBar.js
Outdated
@@ -121,6 +122,7 @@ export default function NavBar({ | |||
<div className="flex flex-row items-center justify-content"> | |||
<SearchButton | |||
className="flex items-center text-left space-x-2 p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out" | |||
aria-label="Open Algolia Search Modal" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aria-label="Open Algolia Search Modal" | |
aria-label="Search in AsyncAPI" |
a90b3c0
to
081fd0f
Compare
081fd0f
to
5b8007b
Compare
5b8007b
to
a439520
Compare
@imabp any other reviews on this? |
a439520
to
a7295fc
Compare
/rtm |
@allcontributorsbot please add @Olaleye-Blessing for code, a11y |
@all-contributors please add @Olaleye-Blessing for code, a11y |
I've put up a pull request to add @Olaleye-Blessing! 🎉 |
Description
Related issue(s)
Closes: #1453