Skip to content

fix(ui5-input): aria-required attribute removed #2552

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

Merged
merged 2 commits into from
Dec 9, 2020
Merged

Conversation

niyap
Copy link
Contributor

@niyap niyap commented Dec 7, 2020

Some of the input-based components have had both "required" and "aria-required" attributes rendered to the inner input when the required property of the component is set to true which is not necessary.
Now, only "aria-required" attribute is rendered, since it is more appropriate in order to avoid "Invalid entry" to be read out when the component is accessed and has no value, which is the expected behaviour when "required" attribute is set, but is a little bit confusing for the users.

elenastoyanovaa
elenastoyanovaa previously approved these changes Dec 8, 2020
@@ -25,7 +25,6 @@
aria-autocomplete="{{accInfo.input.ariaAutoComplete}}"
aria-expanded="{{accInfo.input.ariaExpanded}}"
aria-label="{{accInfo.input.ariaLabel}}"
aria-required="{{accInfo.input.ariaRequired}}"
Copy link
Member

Choose a reason for hiding this comment

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

I understand the change, but just to note that if we remove that we can also remove the following as it is not used in the template anymore:

// Input.js#1070
"ariaRequired": (this._inputAccInfo && this._inputAccInfo.ariaRequired) || this.required

And, second note - the DatePicker used to pass "accInfo.input.ariaRequired",
so it also should be removed if not necessary:

// DatePicker.js#826
"ariaRequired": this.required,

But then I guess we have to forward the "required" property from the DatePicker to the Input in the DatePicker.hbs template. Otherwise, the Input (in the DatePicker) will remain without both aria-required and required, as it previously used only aria-required and now it is being removed from the Input.hbs template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We changed the approach. Now only "aria-required" is always added to the input of all input-based components. Also as you have mentioned, we forward the "required" property from the DatePicker to the Input.

@CLAassistant
Copy link

CLAassistant commented Dec 8, 2020

CLA assistant check
All committers have signed the CLA.

@ilhan007 ilhan007 dismissed their stale review December 8, 2020 17:09

outdated

@ilhan007
Copy link
Member

ilhan007 commented Dec 8, 2020

you have to sign the license/CLA

@ilhan007 ilhan007 merged commit 7456ab5 into SAP:master Dec 9, 2020
@ilhan007 ilhan007 added the SAP SF label Dec 9, 2020
ilhan007 pushed a commit that referenced this pull request Dec 9, 2020
Some of the input-based components have had both "required" and "aria-required" attributes rendered to the inner input when the required property of the component is set to true which is not necessary.
Now, only "aria-required" attribute is rendered, since it is more appropriate in order to avoid "Invalid entry" to be read out when the component is accessed and has no value, which is the expected behaviour when "required" attribute is set, but is a little bit confusing for the users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants