Skip to content

KeyValueInputs AddRowButton - Translate strings (HDS-6114)#3681

Open
KristinLBradley wants to merge 5 commits intomainfrom
kristin/hds-6114-key-value-inputs-translate-strings
Open

KeyValueInputs AddRowButton - Translate strings (HDS-6114)#3681
KristinLBradley wants to merge 5 commits intomainfrom
kristin/hds-6114-key-value-inputs-translate-strings

Conversation

@KristinLBradley
Copy link
Contributor

@KristinLBradley KristinLBradley commented Mar 5, 2026

📌 Summary

If merged, this PR translates previously hard-coded strings in the KeyValueInputs AddRowButton.

🔗 External links


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

📋 PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hds-showcase Ready Ready Preview Mar 11, 2026 9:32pm
hds-website Ready Ready Preview Mar 11, 2026 9:32pm

Request Review

export default class HdsFormKeyValueInputsAddRowButton extends Component<HdsFormKeyValueInputsAddRowButtonSignature> {
@service declare readonly hdsIntl: HdsIntlService;

get ariaLabel(): string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@KristinLBradley (question) do you think that there should be a test for this, confirming that it does what we think it does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not finding other examples of tests for things like this so far. But maybe we should be adding tests? I can ask in the next eng sync, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Btw, currently we just test that the value of this is not empty. Would it be better to test that it has the default value?

/integration/components/hds/form/key-value-inputs/add-row-button-test.gts

test('it should provide an `aria-description` attribute', async function (assert) {
  await render(
    <template>
      <HdsFormKeyValueInputsAddRowButton
        id="test-form-key-value-add-row-button"
      />
    </template>,
  );
  assert
    .dom('#test-form-key-value-add-row-button')
    .hasAttribute(
      'aria-description',
      /.+/,
      'aria-description should not be empty',
    );
});

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think "not empty" is fine since it can be customized. But you could have another test that ensures the default is the fallback. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went ahead and updated the test to instead check for the default value. Please let me know if it looks ok now or if I should change/add anything else. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shleewhite tagging you too just to let you know about the latest update I pushed.

Copy link
Collaborator

@MelSumner MelSumner left a comment

Choose a reason for hiding this comment

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

:shipit:

shleewhite
shleewhite previously approved these changes Mar 11, 2026
KristinLBradley and others added 4 commits March 11, 2026 14:19
Added translated strings for KeyValueInputs AddRowButton ariaLabel and text.
Co-authored-by: Lee White <lee.white@hashicorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants