fix: 🐛 add aria-description to edit User detail btn to fix a11y bug (#3113)

A new param @ariaDescription that was added to addons/rose edit-toggle component 
which now allows us to define the value of aria-description per a11y requirements.
With this change, the User detail edit form button now includes a value for aria-description.

✅ Closes: FE-112

---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
This commit is contained in:
venusangandZhihe Li authored and GitHub committed 2025-12-17 14:09:28 -08:00
1 parent 43249169d8
commit c8737f0474
3 files changed
+5

No files matched your search

@@ -8,6 +8,7 @@
{{yield to='edit'}}
{{else}}
<Hds::Button
aria-description={{@ariaDescriptionEdit}}
@text={{@enableEditText}}
@color='secondary'
{{on 'click' @enableEdit}}
@@ -20,10 +20,12 @@ module(
<Rose::Form::Actions::EditToggle
@enableEdit={{this.enableEdit}}
@enableEditText='Edit'
@ariaDescriptionEdit='Resource'
/>
`,
);
assert.ok(find('button'));
assert.dom('[aria-description]').exists();
});
test('it executes a function on button click', async function (assert) {
@@ -34,6 +36,7 @@ module(
<Rose::Form::Actions::EditToggle
@enableEdit={{this.enableEdit}}
@enableEditText='Edit'
@ariaDescriptionEdit='Resource'
/>
`,
);
@@ -53,6 +53,7 @@
{{#if (can 'save model' @model)}}
<form.actions
@enableEditText={{t 'actions.edit-form'}}
@ariaDescriptionEdit={{t 'resources.user.title'}}
@submitText={{t 'actions.save'}}
@cancelText={{t 'actions.cancel'}}
/>