Skip to content

a11y-doc: Adjust Focus Control to new 16.3 refs + link fixes.#742

Merged
gaearon merged 2 commits intoreactjs:masterfrom
AlmeroSteyn:a11y-docs-update
Mar 30, 2018
Merged

a11y-doc: Adjust Focus Control to new 16.3 refs + link fixes.#742
gaearon merged 2 commits intoreactjs:masterfrom
AlmeroSteyn:a11y-docs-update

Conversation

@AlmeroSteyn
Copy link
Copy Markdown
Collaborator

With release of React 16.3 and the changes to the ref API I have adjusted the accessibility doc to reflect this.

I also fixed a few dead/broken links I found on this page.

I have chosen not to refer to forwardRef in the a11y doc as it is more for creators of HOC's and trying to explain it again on this page would detract from achieving accessibility IMHO.

Content changes are limited to the Programmatically managing focus section. Changes are summarised in the following captures:

image

image

@reactjs-bot
Copy link
Copy Markdown

reactjs-bot commented Mar 30, 2018

Deploy preview for reactjs ready!

Built with commit 6883e33

https://deploy-preview-742--reactjs.netlify.com

@AlmeroSteyn
Copy link
Copy Markdown
Collaborator Author

NOTE: I accidentally duplicated #708 in this fix.

Comment thread content/docs/accessibility.md Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we should promote React.forwardRef() here instead?

@AlmeroSteyn
Copy link
Copy Markdown
Collaborator Author

AlmeroSteyn commented Mar 30, 2018

@gaearon I have adjusted the part about HOC's to mention ref forwarding.

To avoid too much code example duplication and keep focus on the a11y issue at hand I have still not added a code example as this can be found through the link.

The sentence has now become:

When using a HOC to extend components, it is recommended to forward the ref to the wrapped component using the forwardRef function of React. If a third party HOC
does not implement ref forwarding, the above pattern can still be used as a fallback.

What do you think?

@gaearon
Copy link
Copy Markdown
Member

gaearon commented Mar 30, 2018

Sounds good. Mind rebasing?

@AlmeroSteyn
Copy link
Copy Markdown
Collaborator Author

Done!

@gaearon gaearon merged commit a5a622e into reactjs:master Mar 30, 2018
@AlmeroSteyn
Copy link
Copy Markdown
Collaborator Author

Wow that was super quick! Thank you!

@AlmeroSteyn AlmeroSteyn deleted the a11y-docs-update branch June 1, 2018 06:58
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.

4 participants