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

[#173769898] fix accessibility for loadingerrorcomponent #2043

Merged

Conversation

fabriziofff
Copy link
Contributor

Short description:
This pr fix and improves the accessibility for the LoadingErrorComponent

List of changes proposed in this pull request:

  • Fix a bug that allows the screen reader to read the screen section not showed.
  • Update the focus on state change.

@fabriziofff fabriziofff added bonus-vacanze 🏄🏂 a11y Activities related to accessibility labels Jul 13, 2020
@fabriziofff fabriziofff requested a review from CrisTofani July 13, 2020 16:29
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Jul 13, 2020

Affected stories

  • 🐞 #173769898: Settare correttamente il focus e fixare i problemi di accessibilità per il componente LoadingErrorComponent

Generated by 🚫 dangerJS

useEffect(
() => {
if (props.isLoading) {
setAccessibilityFocus(loadingRef, delay);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
setAccessibilityFocus(loadingRef, delay);
setAccessibilityFocus(lprops.isLoading ? loadingRef : errorRef, delay);

same but more coincise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed in e677b09

<View accessible={true} ref={loadingRef} style={{ flex: 1 }}>
<InfoScreenComponent
image={
<Spinner
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Spinner
<ActivityIndicator color={themeVariables.brandPrimaryLight} />

you could use ActivityIndicator since it is already used in few parts (/components/ui/ActivityIndicator)

Spinner black ActivityIndicator
Spinner black ActivityIndicator

Furthermore we could keep the InfoScreenComponent title as non-bold text as it was previously

current on master

Copy link
Contributor Author

Choose a reason for hiding this comment

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

LoadingSpinner changed in e677b09

The text is changed to bold in order to use this pr as an occasion to implements the graphical requirement that was never implemented https://pagopa.invisionapp.com/console/Bonus-Vacanze-ckas11mrt0cfe016bekk47kk5/ckb19iapa0036013eyble6agi/play

Just the subtext cannot be normal for accessibility reasons.

@fabriziofff fabriziofff requested a review from Undermaken July 14, 2020 09:46
@Undermaken Undermaken merged commit 1ad1dcf into master Jul 14, 2020
@fabriziofff fabriziofff deleted the 173769898-fix-accessibility-for-loadingerrorcomponent branch January 21, 2022 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Activities related to accessibility bonus-vacanze 🏄🏂
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants