Skip to content
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

Merged

Conversation

Olaleye-Blessing
Copy link
Contributor

@Olaleye-Blessing Olaleye-Blessing commented Mar 24, 2023

Description

  • Improves the docs page accessibility.

Screenshot (436)

Related issue(s)

Closes: #1453

@netlify
Copy link

netlify bot commented Mar 24, 2023

Deploy Preview for asyncapi-website ready!

Name Link
🔨 Latest commit 87d8e78
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/6447ee0c86af270008f13763
😎 Deploy Preview https://deploy-preview-1464--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Mar 24, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 23
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🔴 PWA 30

Lighthouse ran on https://deploy-preview-1464--asyncapi-website.netlify.app/

@Olaleye-Blessing Olaleye-Blessing force-pushed the 1453-docs-page-accessibility branch from 8e581d5 to 89105fd Compare March 24, 2023 23:55
@Olaleye-Blessing Olaleye-Blessing changed the title fix:Improve docs pages accessibility fix: Improve docs pages accessibility Mar 25, 2023
@Olaleye-Blessing Olaleye-Blessing force-pushed the 1453-docs-page-accessibility branch from 89105fd to a90b3c0 Compare March 25, 2023 18:23
@Olaleye-Blessing Olaleye-Blessing changed the title fix: Improve docs pages accessibility fix: improve docs pages accessibility Mar 25, 2023
@@ -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" />
Copy link
Member

Choose a reason for hiding this comment

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

why empty alt=""?

Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Contributor Author

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/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the image by the way:

Screenshot (446)

@@ -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">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<a className="cursor-pointer" aria-label="AsyncAPI homepage">
<a className="cursor-pointer" aria-label="AsyncAPI">

Copy link
Contributor Author

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.

Copy link
Member

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

@@ -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" />
Copy link
Member

Choose a reason for hiding this comment

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

instead use

Suggested change
<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"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
aria-label="Open Algolia Search Modal"
aria-label="Search in AsyncAPI"

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

@@ -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">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<a className="cursor-pointer" aria-label="AsyncAPI homepage">
<a className="cursor-pointer" aria-label="AsyncAPI">

@@ -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"
Copy link
Member

@imabp imabp Apr 1, 2023

Choose a reason for hiding this comment

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

Suggested change
aria-label="Open Algolia Search Modal"
aria-label="Search in AsyncAPI"

@@ -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"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
aria-label="Open Algolia Search Modal"
aria-label="Search in AsyncAPI"

@Olaleye-Blessing Olaleye-Blessing force-pushed the 1453-docs-page-accessibility branch from a90b3c0 to 081fd0f Compare April 1, 2023 14:42
@Olaleye-Blessing Olaleye-Blessing requested a review from imabp April 1, 2023 19:29
@Olaleye-Blessing Olaleye-Blessing force-pushed the 1453-docs-page-accessibility branch from 081fd0f to 5b8007b Compare April 4, 2023 05:44
@Olaleye-Blessing Olaleye-Blessing force-pushed the 1453-docs-page-accessibility branch from 5b8007b to a439520 Compare April 11, 2023 11:53
@Olaleye-Blessing
Copy link
Contributor Author

Olaleye-Blessing commented Apr 11, 2023

@imabp any other reviews on this?

imabp
imabp previously approved these changes Apr 11, 2023
@derberg
Copy link
Member

derberg commented Apr 25, 2023

/rtm

@asyncapi-bot asyncapi-bot merged commit 79c581a into asyncapi:master Apr 25, 2023
@derberg
Copy link
Member

derberg commented Apr 25, 2023

@allcontributorsbot please add @Olaleye-Blessing for code, a11y

@derberg
Copy link
Member

derberg commented Apr 25, 2023

@all-contributors please add @Olaleye-Blessing for code, a11y

@allcontributors
Copy link
Contributor

@derberg

I've put up a pull request to add @Olaleye-Blessing! 🎉

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

Successfully merging this pull request may close these issues.

Improve accessibility on docs pages
5 participants