Skip to content

fix: update group edit button accessibility and label - #5020

Open
kristian-zendato wants to merge 1 commit into
masterfrom
fix/edit-button-label
Open

fix: update group edit button accessibility and label#5020
kristian-zendato wants to merge 1 commit into
masterfrom
fix/edit-button-label

Conversation

@kristian-zendato

@kristian-zendato kristian-zendato commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@kristian-zendato kristian-zendato added 3. to review Items that need to be reviewed accessibility labels Aug 14, 2026
Comment thread src/settings/FolderGroups.tsx Outdated
Signed-off-by: kristian.zendato <kristian.zendato@nextcloud.com>
<a onClick={removeGroup.bind(this, groupId)} className="close-btn"></a>
<button
onClick={removeGroup.bind(this, groupId)}
aria-label={t('groupfolders', 'Unassign: {group}', { group: displayNames[index] })}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think its enough here to just label the action

Suggested change
aria-label={t('groupfolders', 'Unassign: {group}', { group: displayNames[index] })}
aria-label={t('groupfolders', 'Unassign')}

return <a className="action-rename" onClick={showEdit}>
return <button className="action-rename"
aria-label={t('groupfolders', 'Edit assigned groups: {groups}', { groups: displayNames.join(', ') })}
onClick={showEdit}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

instead of the explicit label that duplicates the concatination logic you can also just add:

<span class="visually-hidden">{t('groupfolders', 'Edit assigned groups:')}</span>

to the button content, then its labelled correctly and you can remove the aria-label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Items that need to be reviewed accessibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[a11y] missing label for edit buttons

2 participants