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

Made aria-multiline true by default in RichText #7306

Merged
merged 1 commit into from Jun 18, 2018

Conversation

Projects
None yet
4 participants
@jorgefilipecosta
Member

jorgefilipecosta commented Jun 14, 2018

Description

There was a misunderstanding of what aria-multiline means. Currently, Gutenberg only used area-multiline true when multi lines could be inserted by pressing enter e.g.: the quote value and the caption of the image. Aria-multiline was set to false when RichText inputs could not have a new line inserted by pressing enter.

aria-multiline should be true in all the inputs with can have multiple lines rendered on the screen (behave like a text area) even if these lines were not created because of line breaks but because of line wrapping (not having space on display to show them in a single line). According to this interpretation, it looks like all the Gutenberg RichgText usage should use aria-multiline = true because all of our RichText use cases are more close to TextAreas to then single line input fields and they may have multiple lines rendered on a screen.

aria-multiline is now true by default in all RichText components.

How has this been tested?

I verified all RichText usages render aria-multiline=true in their dom nodes.

@jorgefilipecosta jorgefilipecosta self-assigned this Jun 18, 2018

@jorgefilipecosta jorgefilipecosta requested a review from afercia Jun 18, 2018

@gziolo

gziolo approved these changes Jun 18, 2018

LGTM, we should include this new prop in README file before we proceed.

@@ -852,9 +852,10 @@ export class RichText extends Component {
formatters,
autocompleters,
format,
ariaMultiline = true,

This comment has been minimized.

@gziolo

gziolo Jun 18, 2018

Member

Let's document this prop before it is merged.

This comment has been minimized.

@jorgefilipecosta

jorgefilipecosta Jun 18, 2018

Member

Documentation was added. Besides documenting I did another update to simplify the code. Now we use the same name as the default aria prop "aria-multiline" but we make it default to true so most RichText users don't need to worry about setting the prop.

@gziolo

gziolo approved these changes Jun 18, 2018

Thanks 🙇

@jorgefilipecosta jorgefilipecosta changed the title from Allow RichText ariaMultiline to be configurable to Made aria-multiline true by default in RichText Jun 18, 2018

@jorgefilipecosta jorgefilipecosta merged commit 60b57db into master Jun 18, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jorgefilipecosta jorgefilipecosta deleted the update/allow-richtext-ariamultiline-to-be-configurable branch Jun 18, 2018

@afercia

This comment has been minimized.

Contributor

afercia commented Jun 18, 2018

Thanks @jorgefilipecosta and everyone. Late to the party, just to confirm blocks editable areas are now announced as textareas and that's what we want to communicate to assistive technology users 🙂

Before:

screen shot 2018-06-18 at 18 40 29

After:

screen shot 2018-06-18 at 18 42 01

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