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

Block Editor: URLInput: Remove autoFocus as a default prop of URLInput #22440

Closed
aduth opened this issue May 18, 2020 · 1 comment
Closed

Block Editor: URLInput: Remove autoFocus as a default prop of URLInput #22440

aduth opened this issue May 18, 2020 · 1 comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@aduth
Copy link
Member

aduth commented May 18, 2020

Previously: #18061 (comment)

Currently, URLInput assigns auto-focus to its rendered input. Auto-focus is largely discouraged (we even enforce a rule) and it should not be the default behavior for such a basic component, as it limits (complicates) reusability and makes unnecessary assumptions about its rendering context. It's assumed that this was the default largely based on the assumption that the input is typically rendered within a Popover, which is not something we should be assuming.

Task: Avoid assigning autoFocus in URLInput. It should still be supported as an optional (opt-in) prop in cases where it is appropriate. This usage and associated cautions should be sufficiently documented.

@aduth aduth added [Type] Task Issues or PRs that have been broken down into an individual action to take [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) labels May 18, 2020
@youknowriad
Copy link
Contributor

this has been done recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants