-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[A11y] [VPAT] 3.3.2 Labels or Instructions - Playground>OpenAI - Form does not indicate required fields #195048
Comments
@dave-gus @1Copenut Could you please provide more context about your expectations here? I'm not sure we should highlight the field in red upon opening the form. Additionally, I've noticed the same pattern being used in other places. Screen.Recording.2024-07-15.at.13.02.22.movScreen.Recording.2024-07-15.at.13.13.52.mov |
@alexwizp There is no indication that certain form fields are required -- either asterisks next to required form field labels or an alert that all fields are required (if that is the case). |
@dave-gus I understand what you mean. I just wanted to say that it's a common issue across most forms in Kibana. I think we should agree on how it should be for all places, rather than focusing on this specific one. Maybe someone from EUI can help us figure out how it should look, or we could fix it on the EUI side to standardize it in one place. |
@alexwizp Ah, yes. Good point. |
@dave-gus I had a very similar issue in Observability: #195038 I think these are similar enough that we need to push for a design review of the UI and guidance on what an accepted pattern should be. I see a few things that need considered and probably updated:
|
If error message(s) is/are presented after submitting, error must be made clear by screen reader and focus should move back to the field (or first field, if there are multiple) where the error occurred. I read an interesting study that inline validation actually causes more errors and increases the time it takes to fill out a form. |
I agree, inline validation is annoying. Especially for a screen reader. In my own testing, inline routines would break in over the next field being announced to tell me about the error, which was overly confusing. Worse yet, some inputs would remove the error when the field regained focus. I'm reaching out to the UX Patterns Working Group to see if we can set some guidelines around this pattern. |
Adding @kyrspl and @MichaelMarcialis for visibility. I feel this would be a good pattern candidate! |
Thanks for the ping, @1Copenut! This has been a topic that comes back up every now and again. I think most recently, I was talking to @julianrosado about this. The current pattern in Kibana, Cloud Portal, etc. is to identify optional form controls (via the That being said, the current direction is not without caveats. As @dave-gus shows in the screenshots above, in situations where all form controls are required, there is no opposing "optional" indicator to help inform users what is or isn't required. Instead, it just appears that the entire form is devoid of any direction (even though in reality, everything is required). Also, if I'm reading the 3.3.2 success criteria correctly, our current approach would not pass. Is that correct? If so, I agree that we should indeed discuss this in the pattern working group and come up with a solution that passes the success criteria but also doesn't visually overwhelm users in forms with majority required fields. I'll add this topic to the next working group agenda. |
I agree with @dave-gus about the potential for confusion when all fields are required. In the past I've recommended adding a single line underneath the heading that states "All fields are required" and used Adding "required" to each input feels overly heavy; more ink on the page than we need. By having a clear instruction statement, we can eliminate that momentary "what's required" cognitive load and hopefully reduce errors in submission. |
@1Copenut, @dave-gus: A group of us (@mdefazio, @kyrspl, myself) met up today to discuss this issue. After reviewing the WCAG guidance, we thought the following pattern would make the most sense to use going forward:
Assuming you both agree with this guidance, we'd like to package it up as part of a larger set of form guidance and patterns in the working group. Let us know if ya'll have any questions or concerns. Thanks! |
@MichaelMarcialis @cee-chen could you please update EUI docs with ^^^ |
@liranabn I've added this to the Search Relevance team project. We'll want to implement the guidelines laid out in this comment: #195048 (comment) |
@daveyholler @mdefazio: Can you please confirm if this is what is expected considering all fields are required? |
## Summary refers #195048 (comment) The goal is to display a high-level error message at the top of the form. We don’t need to show specific details but can provide a general hint, such as `There are some errors in the form`. When using a screen reader, this message will indicate that the form submission failed due to errors. Each individual field will then be responsible for displaying its own specific error messages. This approach ensures compliance with A11Y standards. ### PR Screen Record #### Add https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f #### Edit https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine <[email protected]>
## Summary refers elastic#195048 (comment) The goal is to display a high-level error message at the top of the form. We don’t need to show specific details but can provide a general hint, such as `There are some errors in the form`. When using a screen reader, this message will indicate that the form submission failed due to errors. Each individual field will then be responsible for displaying its own specific error messages. This approach ensures compliance with A11Y standards. ### PR Screen Record #### Add https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f #### Edit https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 07c64de)
## Summary refers elastic#195048 (comment) The goal is to display a high-level error message at the top of the form. We don’t need to show specific details but can provide a general hint, such as `There are some errors in the form`. When using a screen reader, this message will indicate that the form submission failed due to errors. Each individual field will then be responsible for displaying its own specific error messages. This approach ensures compliance with A11Y standards. ### PR Screen Record #### Add https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f #### Edit https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 07c64de)
## Summary refers elastic#195048 (comment) The goal is to display a high-level error message at the top of the form. We don’t need to show specific details but can provide a general hint, such as `There are some errors in the form`. When using a screen reader, this message will indicate that the form submission failed due to errors. Each individual field will then be responsible for displaying its own specific error messages. This approach ensures compliance with A11Y standards. ### PR Screen Record #### Add https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f #### Edit https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 07c64de)
# Backport This will backport the following commits from `main` to `8.17`: - [[Search][A11Y] Playground -> Open AI form (#202071)](#202071) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Samiul Monir","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-16T15:49:37Z","message":"[Search][A11Y] Playground -> Open AI form (#202071)\n\n## Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe goal is to display a high-level error message at the top of the\r\nform. We don’t need to show specific details but can provide a general\r\nhint, such as `There are some errors in the form`. When using a screen\r\nreader, this message will indicate that the form submission failed due\r\nto errors.\r\n\r\nEach individual field will then be responsible for displaying its own\r\nspecific error messages.\r\n\r\nThis approach ensures compliance with A11Y standards.\r\n\r\n### PR Screen Record\r\n\r\n#### Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n#### Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [X] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","Team:Search","backport:version","a11y","v8.18.0","v8.16.2","v8.17.1"],"title":"[Search][A11Y] Playground -> Open AI form","number":202071,"url":"https://github.com/elastic/kibana/pull/202071","mergeCommit":{"message":"[Search][A11Y] Playground -> Open AI form (#202071)\n\n## Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe goal is to display a high-level error message at the top of the\r\nform. We don’t need to show specific details but can provide a general\r\nhint, such as `There are some errors in the form`. When using a screen\r\nreader, this message will indicate that the form submission failed due\r\nto errors.\r\n\r\nEach individual field will then be responsible for displaying its own\r\nspecific error messages.\r\n\r\nThis approach ensures compliance with A11Y standards.\r\n\r\n### PR Screen Record\r\n\r\n#### Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n#### Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [X] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202071","number":202071,"mergeCommit":{"message":"[Search][A11Y] Playground -> Open AI form (#202071)\n\n## Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe goal is to display a high-level error message at the top of the\r\nform. We don’t need to show specific details but can provide a general\r\nhint, such as `There are some errors in the form`. When using a screen\r\nreader, this message will indicate that the form submission failed due\r\nto errors.\r\n\r\nEach individual field will then be responsible for displaying its own\r\nspecific error messages.\r\n\r\nThis approach ensures compliance with A11Y standards.\r\n\r\n### PR Screen Record\r\n\r\n#### Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n#### Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [X] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Samiul Monir <[email protected]>
# Backport This will backport the following commits from `main` to `8.x`: - [[Search][A11Y] Playground -> Open AI form (#202071)](#202071) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Samiul Monir","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-16T15:49:37Z","message":"[Search][A11Y] Playground -> Open AI form (#202071)\n\n## Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe goal is to display a high-level error message at the top of the\r\nform. We don’t need to show specific details but can provide a general\r\nhint, such as `There are some errors in the form`. When using a screen\r\nreader, this message will indicate that the form submission failed due\r\nto errors.\r\n\r\nEach individual field will then be responsible for displaying its own\r\nspecific error messages.\r\n\r\nThis approach ensures compliance with A11Y standards.\r\n\r\n### PR Screen Record\r\n\r\n#### Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n#### Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [X] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","Team:Search","backport:version","a11y","v8.18.0","v8.16.2","v8.17.1"],"title":"[Search][A11Y] Playground -> Open AI form","number":202071,"url":"https://github.com/elastic/kibana/pull/202071","mergeCommit":{"message":"[Search][A11Y] Playground -> Open AI form (#202071)\n\n## Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe goal is to display a high-level error message at the top of the\r\nform. We don’t need to show specific details but can provide a general\r\nhint, such as `There are some errors in the form`. When using a screen\r\nreader, this message will indicate that the form submission failed due\r\nto errors.\r\n\r\nEach individual field will then be responsible for displaying its own\r\nspecific error messages.\r\n\r\nThis approach ensures compliance with A11Y standards.\r\n\r\n### PR Screen Record\r\n\r\n#### Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n#### Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [X] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202071","number":202071,"mergeCommit":{"message":"[Search][A11Y] Playground -> Open AI form (#202071)\n\n## Summary\r\n\r\nrefers\r\nhttps://github.com//issues/195048#issuecomment-2393788073\r\n\r\nThe goal is to display a high-level error message at the top of the\r\nform. We don’t need to show specific details but can provide a general\r\nhint, such as `There are some errors in the form`. When using a screen\r\nreader, this message will indicate that the form submission failed due\r\nto errors.\r\n\r\nEach individual field will then be responsible for displaying its own\r\nspecific error messages.\r\n\r\nThis approach ensures compliance with A11Y standards.\r\n\r\n### PR Screen Record\r\n\r\n#### Add\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f\r\n\r\n#### Edit\r\n\r\n\r\nhttps://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674\r\n\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [X] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"07c64de7ef08ece1b2710fa54fbeb29460ec809d"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Samiul Monir <[email protected]>
## Summary refers elastic#195048 (comment) The goal is to display a high-level error message at the top of the form. We don’t need to show specific details but can provide a general hint, such as `There are some errors in the form`. When using a screen reader, this message will indicate that the form submission failed due to errors. Each individual field will then be responsible for displaying its own specific error messages. This approach ensures compliance with A11Y standards. ### PR Screen Record #### Add https://github.com/user-attachments/assets/2e6c3304-0ad1-4d84-acc0-f9413e1fd73f #### Edit https://github.com/user-attachments/assets/7f54114c-4b95-40cd-bdec-f506d7151674 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine <[email protected]>
Steps to Reproduce:
Create a Search project and go to the Search project homepage (ex: https://my-elasticsearch-project-eca3d1.kb.eu-west-1.aws.qa.elastic.cloud/app/elasticsearch)
The issue:
Required form fields are not indicated
BEFORE:
AFTER:
WCAG or Vendor Guidance (optional)
The text was updated successfully, but these errors were encountered: