Skip to content

Conversation

@alexstine
Copy link
Contributor

@alexstine alexstine commented Jun 18, 2021

Description

Resolves #29526

Remove role="group" from block props to hopefully fix #29526.

How has this been tested?

I local tested this with NVDA screen reader and all seems to be working fine.

Screenshots

Types of changes

Bug Fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@alexstine alexstine requested a review from ellatrix as a code owner June 18, 2021 02:11
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @alexstine! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jun 18, 2021
@alexstine alexstine self-assigned this Jun 18, 2021
@alexstine alexstine added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Accessibility Feedback Need input from accessibility labels Jun 18, 2021
@alexstine
Copy link
Contributor Author

Right now I am waiting on PR testing. I believe this is in a good spot for code review. I still have some broken e2e tests, but I will fix them tomorrow when I am more awake. Want to know if anyone foresees any issues with this change.

Thanks.

@youknowriad
Copy link
Contributor

Do we know when this role was added and why?

@Mamaduka
Copy link
Member

I think it was introduced via #19213.

@alexstine
Copy link
Contributor Author

It would be easier if there was a way to only target JAWS for example, but we're not there yet. Compatibility between screen readers is not an easy thing to achieve. When I removed the role, I couldn't notice NVDA announcing anything less or more, I wonder if it is required now. The down side is I am running the latest version so it is possible it could break in older versions of NVDA for example. I still lack a bit of background as to why this was introduced in the first place.

@youknowriad
Copy link
Contributor

Maybe @MarcoZehe could shed some light on this if time allows.

id: `block-${ clientId }${ htmlSuffix }`,
tabIndex: 0,
role: 'group',
role: undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just remove the property entirely (I mean dropping this line), I guess same thing for the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@youknowriad I didn't remove it because rich-text defines a default role of textbox. Specifying undefined here overrides the role in passed props.

Either way, the tests would have needed changing. Seems this effects quite a few of them.

Copy link
Contributor

Choose a reason for hiding this comment

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

so we don't want to retain the textbox role for RichTexts? Why some RichText should have it and others not?

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 don't really see the need for it. contentEditable seems to work fine unless others see a specific reason we should retain this role. It will need a fair amount of testing to be sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough, I think this was originally proposed by @afercia. We'd have to dig up the history to check the reasoning there.

@youknowriad
Copy link
Contributor

@ellatrix This PR might be of interest to you as well.

@MarcoZehe
Copy link
Contributor

Sorry, I am currently not available for any accessibility work due to being ill.

@youknowriad
Copy link
Contributor

@MarcoZehe sorry to here that, Get well soon ❤️

@alexstine
Copy link
Contributor Author

@youknowriad Fixing the e2e tests would be much faster if it didn't error out on my computer.

https://wordpress.slack.com/archives/C02QB2JS7/p1623986632256700

Any suggestions on fixing that?

Get well @MarcoZehe

@alexstine
Copy link
Contributor Author

@youknowriad I fixed a lot of the e2e tests but can't figure out these remaining ones. Can you provide any assistance?

Thanks.

@youknowriad
Copy link
Contributor

I think the two remaining ones are independent from this PR and have been inconsistently failing in trunk as well. We're working on them separately, you can try rebasing the PR and/or restarting the jobs to see if they fail consistently here.

@alexstine
Copy link
Contributor Author

Just merged upstream trunk in to this PR. Hopefully it will fix it. Good to know those checks were not associated with this PR. I thought I had fixed them all from local tests.

@alexstine
Copy link
Contributor Author

This needs more work. I am moving my work to another branch and will open a fresh PR when ready.

@alexstine alexstine closed this Jul 22, 2021
@alexstine alexstine deleted the fix/jaws-editing-blocks branch July 22, 2021 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Accessibility Feedback Need input from accessibility [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to edit blocks once they've been inserted into content while using a screen reader

4 participants