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

Accessibility improvement on #29530 issue #29534

Merged
merged 11 commits into from
Mar 10, 2021
Merged

Accessibility improvement on #29530 issue #29534

merged 11 commits into from
Mar 10, 2021

Conversation

Quintis1212
Copy link
Contributor

Hello ) Just simple accessibility improvement to allow close nav panel of site editor on esc button. Issue - "Site Editor Navigation Panel - Allow 'esc' to close the panel. #29530"

@annezazu annezazu added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Mar 4, 2021
Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

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

Hi @Quintis1212, thanks so much for jumping on this issue!

Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

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

This looks good and tests well for me.

Thanks for your help here @Quintis1212 !


/**
* Internal dependencies
*/
import ContentNavigation from './content-navigation';
import TemplatesNavigation from './templates-navigation';
import { useSelect } from '@wordpress/data';
import { useSelect, useDispatch } from '@wordpress/data';
Copy link
Contributor

Choose a reason for hiding this comment

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

I know you didn't add this here, and wont block the PR on it. But just noticing this import should fall under the "WordPress dependencies" group of imports above.

Copy link
Contributor Author

@Quintis1212 Quintis1212 Mar 8, 2021

Choose a reason for hiding this comment

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

@Addison-Stavlo thank you for help !) I updated the dependencies group )

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, thanks!

@Addison-Stavlo
Copy link
Contributor

Will merge this for you, but it looks like Static Analysis needs to pass first (rerunning it, will investigate more if there are any issues).

@Addison-Stavlo
Copy link
Contributor

Im wondering why the static analysis keeps erroring on the lint command for this PR. I wonder if rebasing off the latest trunk might help.

@Quintis1212
Copy link
Contributor Author

Quintis1212 commented Mar 8, 2021

@Addison-Stavlo
There is an error :

[1] 55:3 error Static HTML elements with event handlers require a role jsx-a11y/no-static-element-interactions
This is a div tag which begins on 55 line
What role I can give this element ? role="main" ?

@Addison-Stavlo
Copy link
Contributor

Addison-Stavlo commented Mar 8, 2021

What role I can give this element ? role="main" ?

Oh, that is a good question. Im not sure what makes the most sense: Navigation, Index, ListBox, something else? cc @Copons @david-szabo97 re: the wrapper for the navigation panel component. I also wonder why this wasn't an issue with the list-view component (perhaps b/c it has 'aria-labelledby'? or do we need to add a role there as well?). 🤔

@Quintis1212
Copy link
Contributor Author

@Quintis1212
Copy link
Contributor Author

@Addison-Stavlo , @Copons , @david-szabo97 new error :
[1] 55:3 error Non-interactive elements should not be assigned mouse or keyboard event listeners jsx-a11y/no-noninteractive-element-interactions
Who can help me with this error ?

@Quintis1212
Copy link
Contributor Author

Maybe just add disable-lint comment at div tag ?

@Addison-Stavlo
Copy link
Contributor

Addison-Stavlo commented Mar 9, 2021

Maybe just add disable-lint comment at div tag ?

yeah I think a lint disable (and not adding a role) might make the most sense in this specific circumstance:

// eslint-disable-next-line jsx-a11y/no-static-element-interactions

Apologies for not recommending that earlier, I should have noticed that 🤣 and realized that the role doesn't really make sense here.

@Quintis1212
Copy link
Contributor Author

Quintis1212 commented Mar 10, 2021

@Addison-Stavlo
React Native E2E Tests (iOS) / test (12.2, gutenberg-editor-gallery) (pull_request) :
`
● Test suite failed to run

TypeError: Cannot read property 'stopDriver' of undefined

  24 | 
  25 | 	async teardown() {
> 26 | 		await this.global.editorPage.stopDriver();
     | 		                             ^
  27 | 		await super.teardown();
  28 | 	}
  29 | }

`
How fix this error ?

@Addison-Stavlo
Copy link
Contributor

How fix this error ?

I reran the test and it passed. Looking at some recent commits on master, it seems to have failed for a few of them in the same manner. It seems something is inconsistent with that test setup that we will need to look into elsewhere.

Anyways, this is working well and tests are passing. Thanks for all the work here!

@Addison-Stavlo Addison-Stavlo merged commit 587134c into WordPress:trunk Mar 10, 2021
@github-actions github-actions bot added this to the Gutenberg 10.2 milestone Mar 10, 2021
@Quintis1212
Copy link
Contributor Author

@Addison-Stavlo I am very happy ) thank you for help in this PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants