Issue Fix - A11y - Update the visuals of select and hover to be better contrast #31682#31686
Closed
RudraPrasad001 wants to merge 6 commits intoelement-hq:developfrom
Closed
Issue Fix - A11y - Update the visuals of select and hover to be better contrast #31682#31686RudraPrasad001 wants to merge 6 commits intoelement-hq:developfrom
RudraPrasad001 wants to merge 6 commits intoelement-hq:developfrom
Conversation
Author
Member
|
Hi, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
This PR implements improved visual styling for the room list items in Element Web, addressing accessibility and contrast requirements for selected and hover states.
What has been changed:
Selected State:
Added a curved vertical indicator (4px width, #007a61 color) on the left side of selected room items
Implemented a subtle background color (#e1e6ec) with an 8px gap between the indicator and background for better visual separation
Applied rounded corners (8px border-radius) to both the indicator and background for a modern, polished appearance
Used CSS pseudo-elements (::before and ::after) to achieve the layered design with proper z-index management
Hover State:
Applied a background color using the theme variable var(--cpd-color-bg-action-secondary-hovered) on hover
Added a smooth left shift animation (8px translateX) for room avatar and content on hover to provide interactive feedback
Ensured hover effects do not apply to already-selected items using :not(.mx_RoomListItemView_selected) selectors to prevent visual conflicts
Transitions:
Added smooth 0.2s ease transitions for all state changes to enhance user experience
How it achieves the goal:
The implementation provides stronger visual contrast between default, hover, and selected states, making it easier for users to identify their current location in the room list. The curved indicator design with proper spacing creates a clear visual hierarchy while meeting accessibility standards for color contrast ratios.
The user "Santhosh Kumar" is being hovered and "Matrix.org" account is being selected, it is styled as required.
Checklist
public/exportedsymbols have accurate TSDoc documentation.