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

Enhance Login and Feedback Navbar Buttons #903

Merged
merged 9 commits into from
May 24, 2023

Conversation

binh-dam-ibigroup
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup commented May 18, 2023

Description

This PR sets the visual content of the "Give Feedback" (or other configured popup) and login buttons to be icons, so that text in some languages doesn't bleed into other content. A popup is also added to these buttons and the language selector. The login button English text is coordinated with the text from the Auth0 login screen.

PR Checklist

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)? => improves i18n by preventing text to bleed into other content.
  • [na] Are appropriate Typescript types implemented?
Before After
Before image After image

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

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

Really great improvement and everything seems to be working well! Just a couple of styling adjustments.

Comment on lines +112 to +114
<NavItem {...commonProps} onClick={onSignInClick} title={loginText}>
<UserIcon />
<InvisibleA11yLabel>{loginText}</InvisibleA11yLabel>
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of importing the a11y label could you just add aria-label to the NavItem? Same with the survey button.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's the advantage of using the invisible element: no extra ARIA attribute is needed!

lib/components/app/desktop-nav.tsx Outdated Show resolved Hide resolved
>
<FormattedMessage id={`config.popups.${popupTarget}`} />
<Icon iconType={popupTarget} />
Copy link
Contributor

Choose a reason for hiding this comment

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

You have the chat bubble icon in the screenshot and I think I prefer it to this popout icon. We use this popout icon in other places to indicate that something will open in a new window/tab which feels a little inconsistent with the survey iframe behavior.

Copy link
Collaborator Author

@binh-dam-ibigroup binh-dam-ibigroup May 23, 2023

Choose a reason for hiding this comment

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

I am not sure to understand... It's the same (configured) icon that is also used at the top of itinerary results, at the bottom of an expanded itinerary, and in the app menu. Maybe the a11y text needs to say "Opens in a popup" or something?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need additional text! Using this icon for the feedback button in the app menu makes sense, because in mobile view this will open a brand new window in the browser. But in desktop view, it only opens a modal. And since generally when we use this icon (#859) it means it's opening a new window, it seems more consistent to have a different icon for the desktop nav.

I suppose I don't mind keeping this icon for both, I can defer to the second reviewer! But I do prefer the chat bubble, if that's an option.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Per our call earlier, I will add additional a11y text to warn of a tab/window opening on mobile. We will keep using any configured icon if any.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added the a11y text in 63ba3ff and subsequent commits.

Comment on lines +347 to +348
signIn: Log in
signOut: Log out
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for doing this!

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

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

Looks good! I like the layout! Thanks

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

Looks good on Firefox! Thanks!

@binh-dam-ibigroup binh-dam-ibigroup merged commit ba654ab into dev May 24, 2023
@binh-dam-ibigroup binh-dam-ibigroup deleted the enhance-signin-feedback-btns branch May 24, 2023 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants