Closed josephliccini closed 5 years ago
Note, I can easily fix this by removing the CARET_ELEMENTS
check in Preboot. I can submit a PR if desired.
Thanks @CaerusKaru !
Recommendations on how write a test for this change in this repo?
@josephliccini What kind of test change are you thinking about?
Something like: "focus on a server element" preboot performs swap "assert focus on correct element"
Take a look at the integration tests here. It should be straightforward to add, thanks!
Note: for support questions, please use the Universal Slack Channcel or https://gitter.im/angular/universal
I'm submitting a ...
[x] bug report
[x] feature request
Which parts of preboot are affected by this issue?
[ ] server side
[x] client side
[x] inline
[ ] build process
[ ] docs
[ ] tests
Do you want to request a feature or report a bug? It's kind of both.
What is the current behavior? Right now, there's logic to maintain focus in elements such as
<textarea>
and<input>
, when the Client swaps into view.Users who use screenreaders use the browser focus for many other different elements on the page, and rely on the focus on those elements, along with the screenreader, to announce where they are on the app.
If a screenreader user tabs through an
<a>
tag, for example, on the Server View, the Client View will not set focus.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem by creating a github repo. If you just tab to an
<a>
tag in the server view, the callreplayEvents()
you will lose focus.What is the expected behavior? Focus is maintained for all elements, not just
<textarea>
and<input>
What is the motivation / use case for changing the behavior? Accessibility
Please tell us about your environment:
Browser: [all ]
Language: [ TypeScript ]
OS: [all]
Platform: [all]
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)