Modification - Update of the suffix and prefix directives #1082
elenagarrone
started this conversation in
Canopy requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Type of request
Modification
Component, pattern, template, helper or foundation?
Helper
Nature of request
I want to propose the modification of the
suffix
andprefix
directives from the code base.This would be a breaking change, mainly because we need to make sure that the projects have descriptive labels in place.
The reason for the modification has arisen from the investigation of the issue: #1069
At the moment, the only function of the
suffix
andprefix
directives is to add anid
to the element that uses the directive.The
id
is then linked to the text input via thearia-describedby
attribute.Note:
suffix
andprefix
directives are only used by the text input.The fact that the elements with the directives are connected to the text input causes confusion; for example the below scenario shouldn't read the
close search
buttons until the user tabs on them:From the article linked in the issue above:
Proposed changes:
We should:
id
to the element using the directivearia-hidden="true"
to the element using the directive (the only exclusion is if the element is a button as we want the label to be read when the user tabs to it)aria-descriedby
Beta Was this translation helpful? Give feedback.
All reactions