-
Notifications
You must be signed in to change notification settings - Fork 950
A11y: Replace non-semantic div buttons with <button> in URLPopUpSection #13724
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
base: main
Are you sure you want to change the base?
A11y: Replace non-semantic div buttons with <button> in URLPopUpSection #13724
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves accessibility by replacing non-semantic <div role="button"> elements with proper <button> elements in the URL popup section, aligning with WCAG guidelines and improving keyboard navigation and screen reader support.
Key Changes:
- Replaced three
<div role="button">elements with native<button>elements (copy, edit, and remove buttons) - Removed redundant
role="button"attributes since native buttons have implicit button semantics - Fixed a bug where the edit button incorrectly used
copyLinkTextfor its aria-label instead ofeditLinkText
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b31a89d to
0bf8743
Compare
|
Hi, elements inside URLPopUpSection.ts with native elements to align with A11y best practices. The original behavior, styling, aria-labels, icons, and event handlers remain unchanged.
This improves:
|
|
Thanks @omkarhole! I noticed the Change-Id is missing. Please make sure your commits include both a Signed-off-by (DCO) line and a Change-Id. Add Change-IdTo automatically generate a Change-Id:
|
0bf8743 to
d9c26f7
Compare
|
Thanks for the feedback. I’ve added the Change-Id and updated the commit as requested. |
rparth07
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @omkarhole for patch:)
Overall changes are good! This enhancement will make it better :)
| app.LOUtil.setImage(imgCopyBtn, 'lc_copyhyperlinklocation.svg', app.map); | ||
| imgCopyBtn.setAttribute('width', 18); | ||
| imgCopyBtn.setAttribute('height', 18); | ||
| imgCopyBtn.setAttribute('alt', copyLinkText); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we have aria-label on parent button. we can avoid populating alt attribute on <img> to avoid confusion for assistive technology. we can set it to empty. i.e. imgCopyBtn.setAttribute('alt', '');
| app.LOUtil.setImage(imgEditBtn, 'lc_edithyperlink.svg', app.map); | ||
| imgEditBtn.setAttribute('width', 18); | ||
| imgEditBtn.setAttribute('height', 18); | ||
| imgEditBtn.setAttribute('alt', editLinkText); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, we can update alt to empty string.
| app.LOUtil.setImage(imgRemoveBtn, 'lc_removehyperlink.svg', app.map); | ||
| imgRemoveBtn.setAttribute('width', 18); | ||
| imgRemoveBtn.setAttribute('height', 18); | ||
| imgRemoveBtn.setAttribute('alt', removeLinkText); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, we can update alt to empty string.
|
I see this will affect UI as above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@omkarhole the URL popup UI fully broken now it's not looking okay. A11y should not change the UI look the buttons should be consistent as it was before....
|
sure i will fix it . |
|
attempted to verify the fix using the Ona development environment, but environment creation requires credit-card verification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@omkarhole Merge commits are not allowed... can you please rebase? |
9fb23eb to
2b804be
Compare
|
Hi @rparth07 , @Darshan-upadhyay1110 |
hi @omkarhole I see it still has merge commit on top: 47da10f could you please rebase it instead? |
47da10f to
3fa947d
Compare
| vertical-align: middle; | ||
| } | ||
|
|
||
| .hyperlink-popup-btn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hii , @rparth07 . I Have Check the changes on my local machine and it dosent shows button UI affected


would you please recheck it again ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @omkarhole, can you please do a make clean and built it again and check.
I can see the UI affected.
- till commit c191d64771 UI is normal
i.e.
Screencast.from.2026-01-02.11-58-25.webm
- on commit 3fa947dda2 UI is broken
i.e.
Screencast.from.2026-01-02.12-01-14.webm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rparth07 which browser are you using chrome or other ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chromium Version 143.0.7499.146
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rparth07
i have check the again CSS but it dosent show any UI Broken and i use google chrome browser in that i works fine ! .would you please check on different browser on you local system please .
|
hi @omkarhole I also tested this patch here how it looks , I can also reproduce the issue what @rparth07 mentioned in above comments...
Screencast.from.2026-01-02.17-10-26.webmUsing chrome : Version 143.0.7499.109 (Official Build) (64-bit) so i would suggest you do a clean build ? and then test ? |
|
@Darshan-upadhyay1110 , @rparth07 i have done clean code and make some changes and also created video and now the UI looks Good . please go through video and check on your local machine also video: Untitled.video.-.Made.with.Clipchamp.1.mp4 |
|
Please add change ID and DCO. And i see the cypress is not happy can you please check if it's passes the cases in local or not ? |
6cb86fe to
5fc6582
Compare
|
hi @omkarhole, it looks like you accidentally includes already merged commits in this PR. can you please fix it. Thanks :) |
- Replaced div role='button' elements with proper button elements - Removed redundant ARIA roles (button role is implicit in button elements) - Fixed aria-label on edit button (was using copyLinkText instead of editLinkText) - Set alt='' on images since buttons already have aria-labels (avoiding redundancy) - Added CSS reset for button elements to maintain consistent styling - Improved keyboard accessibility and screen reader support Issue: CollaboraOnline#12017 Signed-off-by: omkar hole <[email protected]> Change-Id: I06f6da85ffbaa656962fad3207c6a4c132d07572
5fc6582 to
642cf20
Compare
|
@rparth07 i have fix the branch and make it clean you can review it . |





Replaced non-semantic
Changes
Preserved:
Issue Link:#12017
@rparth07 @Darshan-upadhyay1110