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

Validation: Move error message box to the bottom #100

Closed
9 tasks
mrosvik opened this issue Mar 17, 2022 · 5 comments
Closed
9 tasks

Validation: Move error message box to the bottom #100

mrosvik opened this issue Mar 17, 2022 · 5 comments
Labels
area/accessibility related to WCAG and accessibility kind/user-story Used for issues that describes functionality for our users. org/ssb Issues relevant for Statistisk sentralbyrå. ux Needs some love from a UX resource

Comments

@mrosvik
Copy link
Member

mrosvik commented Mar 17, 2022

Description

As a user I want to see why I can´t click "Next", so that I can complete the form.

  • The error message box thats shows when you try to hit "Next"/"Send" should be connected with the "Next"/"Send"-button, since the summary explain why the next button is not working.
  • The error messages should link to the field where the error is (set focus).
  • WCAG: The current error message use H2 and H4 as texts. This is not compliant with WCAG. Remember to think about what header we use on the new component

Design

https://www.figma.com/file/Pvti3aRcOwH0k5Z7DrLznk/Arbeidsomr%C3%A5de%3A-Altinn-Studio-APPS?node-id=2545%3A50628

image

Development tasks

  • Move error box from the top, into the bottom of the form.
  • Link the error to the connected field (set focus).

Test

Definition of done

  • Documentation (docs.altinn.studio) is updated (if relevant)
    • Technical documentation
    • User documentation
  • QA
  • Manual test is complete (if relevant)
  • Automated test is implemented (if relevant)
  • All tasks in this userstory are closed (i.e. remaining tasks are moved to other user stories or marked obsolete)
@mrosvik mrosvik added kind/user-story Used for issues that describes functionality for our users. ux Needs some love from a UX resource solution/app-frontend labels Mar 17, 2022
@SandGrainOne
Copy link
Member

SandGrainOne commented Mar 17, 2022

@mrosvik This looks very nice, but I'm wondering about soft validation. There is a mechanism to show warnings. Should that be a completely separate thing or should we try to integrate it in this new design.

@FinnurO FinnurO added the org/ssb Issues relevant for Statistisk sentralbyrå. label May 3, 2022
@FinnurO FinnurO transferred this issue from Altinn/altinn-studio May 19, 2022
@olemartinorg
Copy link
Contributor

Innspill fra @FinnurO: Mulig vi bør endre teksten fra "Du må fikse disse feilene før du kan gå videre" til "Du må rette disse feilene før du kan gå videre".

@Febakke
Copy link
Member

Febakke commented Aug 2, 2022

@olemartinorg Is this the correct place for test feedback

Screen reader test: Ok (VoiceOver on chrome)
Keyboard navigation: Ok

Smaller screens:
On smaller screens the text fall down and the icon remains. It would be better to have the text linebreak and always have the start of the text aligned with the icon.
Skjermbilde 2022-08-02 kl  10 59 26

Contrast
In the Figma sketches it looks the pink color is set to 50% opacity. With a white background this would equal to #FCE4E9. This is probably easy to fix with tokens at a later stage?

In the design process we have overlooked a contrast issue when the green (Submit) button are visible on the last page of a application. The button contrast with the red background is to low and break with 1.4.11 Non-text Contrast I could not find an easy way out if this with the current design. It might be best if I create a new issue to work on how to solve this from our end?

hover
Not specified in the sketches and not a WCAG breach. But I think it is a little off on desktop to not have any hover state on the links in the error summary. Would be easily solved with an underline on hover. We have hover states on all other inputs and buttons so it sticks out.

@olemartinorg olemartinorg self-assigned this Aug 2, 2022
@olemartinorg olemartinorg mentioned this issue Aug 2, 2022
4 tasks
@olemartinorg olemartinorg removed their assignment Aug 2, 2022
olemartinorg added a commit that referenced this issue Aug 4, 2022
Co-authored-by: Ole Martin Handeland <git@olemartin.org>
@mrosvik
Copy link
Member Author

mrosvik commented Aug 10, 2022

In addition to what @Febakke mention, the hover border should be black, 2px and cover borders of any extra links appearing in the message (so there is no double borders).
image

(Talked with @olemartinorg about this) :)

The contrast on buttons will be fixed when the latest design tokens are added to the button component.

@mrosvik mrosvik assigned olemartinorg and unassigned mrosvik Aug 10, 2022
@olemartinorg
Copy link
Contributor

I looked into doing this in CSS, but it turns out to be a lot more hacky than I'd like. I looked into it, and with the changes in #372 I moved the code to render links in error messages, so after that is merged I can quite easily extend the function to remove rendering of links inside these error messages (only when shown in this bottom error report). That should solve the link issues without any hacks:

20220810_16h52m07s_grim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/accessibility related to WCAG and accessibility kind/user-story Used for issues that describes functionality for our users. org/ssb Issues relevant for Statistisk sentralbyrå. ux Needs some love from a UX resource
Projects
Status: Done
Development

No branches or pull requests

6 participants