-
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
[Search][A11Y] Playground -> Open AI form #202071
[Search][A11Y] Playground -> Open AI form #202071
Conversation
a96b55f
to
16ea0af
Compare
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the update! LGTM
Pinging @elastic/response-ops (Team:ResponseOps) |
@@ -159,6 +168,11 @@ const CreateConnectorFlyoutComponent: React.FC<CreateConnectorFlyoutProps> = ({ | |||
|
|||
const createdConnector = await createConnector(validConnector); | |||
return createdConnector; | |||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I restrict this change only to gen AI
connectors that we use in playground
as most of these have required fields, or should all connectors have the same behavior?
cc: @mdefazio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adcoelho What if we make the message more generic?
"There are required fields missing" or "Some fields are not valid"
Ideally we will have some message at the top letting the user know there are errors in the form. (which I think is the point of the PR?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we make the message more generic?
"There are required fields missing" or "Some fields are not valid"
These would imo make more sense but I am also trying to be cautious here about a UI change that would affect all connectors. We didn't discuss it internally and weren't aware. But it doesn't seem like a big deal, I'll bring it up in our sync(today).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we make the message more generic?
"There are required fields missing" or "Some fields are not valid"These would imo make more sense but I am also trying to be cautious here about a UI change that would affect all connectors. We didn't discuss it internally and weren't aware. But it doesn't seem like a big deal, I'll bring it up in our sync(today).
Thank you @adcoelho. Please keep us informed about the team's decision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, getting back to this @mdefazio
What if we make the message more generic?
"There are required fields missing" or "Some fields are not valid"
Won't your suggestion then go against the original comment from @MichaelMarcialis that originated this task and where he explicitly says:
If the form has one or more optional fields, no additional affordance is necessary, beyond marking the optional fields.
?
This change only seems to make sense if it applies to connectors where all fields are required and if not we should leave things as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general idea is that if there are any errors in the form, a header should appear at the top with a message like, There are some errors while submitting
. Individual fields or actions can then display their specific error messages for more details. However, I'll let @mdefazio confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct—this is about errors in the form. We removed the message "All fields required" that appears initially prior to submission since this wouldn't make sense for all Connector forms.
Related, the original comment is around noting which fields are required, prior to form submission, not about error handling.
If i'm not mistaken, the benefit of this additional callout, is to indicate that there are errors in the form, which may be out of view initially, and provide a landmark and message to screen readers.
If we make this message generic, meaning simply "There are fields with errors.", or "Some fields were not valid", etc., it allows us to show this regardless if all fields are required or not—so for every connector type form.
Someone can correct me on the need and benefit of this, but that is my understanding. I acknowledge that the Connector framework is unique based on the dynamic nature of the forms, so this is a tricky one to start off with for this pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, my comment wasn't saying that an error callout such a this can't be shown on form submission. I was just stating that a simple note stating that "All items are required" (shown before form submission) isn't to be used on a form that has one or more optional elements. If ya'll feel this form is lengthy, with some elements with validation errors falling out of view, and could benefit from the inclusion of an additional callout indicating errors, I'll leave that to your discretion.
it('show Required all fields message', async () => { | ||
const { getByTestId } = appMockRenderer.render( | ||
<CreateConnectorFlyout | ||
actionTypeRegistry={actionTypeRegistry} | ||
onClose={onClose} | ||
onConnectorCreated={onConnectorCreated} | ||
onTestConnector={onTestConnector} | ||
/> | ||
); | ||
await act(() => Promise.resolve()); | ||
|
||
await userEvent.click(getByTestId(`${actionTypeModel.id}-card`)); | ||
|
||
await waitFor(() => { | ||
expect(getByTestId('test-connector-text-field')).toBeInTheDocument(); | ||
}); | ||
|
||
await userEvent.type(getByTestId('test-connector-text-field'), 'My text field', { | ||
delay: 100, | ||
}); | ||
|
||
await userEvent.click(getByTestId('create-connector-flyout-save-btn')); | ||
|
||
expect(onClose).not.toHaveBeenCalled(); | ||
expect(onConnectorCreated).not.toHaveBeenCalled(); | ||
expect(getByTestId('required-field-error-label')).toBeInTheDocument(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it('show Required all fields message', async () => { | |
const { getByTestId } = appMockRenderer.render( | |
<CreateConnectorFlyout | |
actionTypeRegistry={actionTypeRegistry} | |
onClose={onClose} | |
onConnectorCreated={onConnectorCreated} | |
onTestConnector={onTestConnector} | |
/> | |
); | |
await act(() => Promise.resolve()); | |
await userEvent.click(getByTestId(`${actionTypeModel.id}-card`)); | |
await waitFor(() => { | |
expect(getByTestId('test-connector-text-field')).toBeInTheDocument(); | |
}); | |
await userEvent.type(getByTestId('test-connector-text-field'), 'My text field', { | |
delay: 100, | |
}); | |
await userEvent.click(getByTestId('create-connector-flyout-save-btn')); | |
expect(onClose).not.toHaveBeenCalled(); | |
expect(onConnectorCreated).not.toHaveBeenCalled(); | |
expect(getByTestId('required-field-error-label')).toBeInTheDocument(); | |
it('show Required all fields message', async () => { | |
appMockRenderer.render( | |
<CreateConnectorFlyout | |
actionTypeRegistry={actionTypeRegistry} | |
onClose={onClose} | |
onConnectorCreated={onConnectorCreated} | |
onTestConnector={onTestConnector} | |
/> | |
); | |
await userEvent.click(await screen.findByTestId(`${actionTypeModel.id}-card`)); | |
expect(await screen.findByTestId('test-connector-text-field')).toBeInTheDocument(); | |
await userEvent.type( | |
await screen.findByTestId('test-connector-text-field'), | |
'My text field', | |
{ | |
delay: 100, | |
} | |
); | |
await userEvent.click(await screen.findByTestId('create-connector-flyout-save-btn')); | |
expect(onClose).not.toHaveBeenCalled(); | |
expect(onConnectorCreated).not.toHaveBeenCalled(); | |
expect(await screen.findByTestId('required-field-error-label')).toBeInTheDocument(); |
The other tests in this file are very outdated(I assume you used those as reference).
screen
is preferred over the results of render
, findBy*
is preferred over getBy*
, and await act(() => Promise.resolve());
is not needed(and potentially problematic) when waitFor
and findBy
should be used to wait for pending promises to be resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also make sure that in this test all fields are required(and the message shows)? And maybe add another where when not all fields are required the message is not displayed? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the suggestion. I will update these tests accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elasticmachine merge upstream |
@@ -136,8 +138,19 @@ const ConnectorFormComponent: React.FC<Props> = ({ | |||
useEffect(() => { | |||
if (onChange) { | |||
onChange({ isValid: isFormValid, isSubmitted, isSubmitting, submit, preSubmitValidator }); | |||
if (isFormValid) { | |||
resetErrorMessage?.(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isFormValid
is available "above" in the flyout(/create_connector_flyout/index.tsx
) so it is not necessary to pass this function to the connector form. Why not keep all the logic there instead?
I wouldn't have noticed if you hadn't mentioned tbh. I don't mind leaving it as is, specially if it is complicated to change. |
@mdefazio We are currently depending on the form to decide if it has any errors. If we want only to handle it based on |
01110f3
to
d5b647e
Compare
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
++ This makes sense to me. Helps avoid the form jumping as well. Thank you for taking the time to look into this. |
Starting backport for target branches: 8.16, 8.17, 8.x |
## 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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# 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]>
## 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]>
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
Add-connector-form.mov
Edit
edit.mov
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.