Click anywhere on byline to collapse a comment#3198
Merged
dessalines merged 1 commit intoLemmyNet:mainfrom Jun 24, 2025
Merged
Conversation
dessalines
reviewed
Jun 19, 2025
Member
dessalines
left a comment
There was a problem hiding this comment.
Not a fan of this, and it really isn't necessary since there's already a collapse button. Also its probably confusing for i18n.
Contributor
Author
|
The issue with a collapse button is that its horizontal position changes at each indentation level. It's also a smaller click target, which can be an issue for those with visual impairments. On mobile, most people are using their right hand which poses difficulty since the collapse button is on the left. When the click region is the entire bar, it makes the core workflow of collapsing to skip past irrelevant discussion much easier. |
dessalines
approved these changes
Jun 24, 2025
Member
dessalines
left a comment
There was a problem hiding this comment.
Alright, hopefully it doesn't cause any issues.
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 intends to increase target clickable area in furtherance of accessibility. Similarly to Reddit, allows the user to click anywhere alongside the byline (username, etc.) to collapse a comment. Affects URLs at
/post/*.Does not fix a separate issue.
Disclaimer
This PR departs a bit from convention by exempting a code change from a couple of lint rules, and here is why I believe these are an exception. (For reference, the lint rules relate to clickable element requirements.):
The button element for collapsing comments still exists as before, with the key and click handlers, and continues to serve as an accessibility-friendly way to toggle the
collapsed?state of a CommentNode. This PR simply expands the clickable region (which is itself for accessibility reasons), but having screen readers treat the entire region as a button or clickable element is not a desired behavior, since it may contain other clickable elements within. This is intended as a convenience for graphical users (desktop, mobile).Screenshots
No visual difference, but new behavior: