Skip to content

Conversation

@AprilSylph
Copy link
Owner

Description

Adds an off-by-default option to Classic Footer: "Hide the note count on posts with no notes".

This adds the aria-hidden attribute to note count buttons created by Classic Footer. If this option is enabled and the post has zero notes, it is set to true; otherwise, it is false (which, for once, is actually synonymous with not having the attribute present at all).

Note count buttons with aria-hidden="true" have visibility: hidden; applied to them, keeping them in the flex layout (which keeps the interaction buttons right-aligned with no additional CSS) but otherwise removing them from sight.

Testing steps

  1. Load the modified addon
  2. Enable Classic Footer
  3. Enable the "Hide the note count on posts with no notes" option
  4. Find a post with at least one note
    • Expected result: The note count button is visible
    • Expected result: The note count button is exposed in the accessibility tree
  5. Find a post with zero notes
    • Expected result: The note count button is not visible
    • Expected result: The note count button is not exposed in the accessibility tree
    • Expected result: The interaction buttons are still right-aligned, as in other posts
  6. Disable the "Hide the note count on posts with no notes" option
    • Expected result: The post with zero notes now shows a "0 notes" button
    • Expected result: The "0 notes" button is exposed in the accessibility tree

@AprilSylph AprilSylph merged commit 2bb7ddc into master Nov 13, 2025
5 checks passed
@AprilSylph AprilSylph deleted the aprilsylph/classic-footer-no-zero-notes branch November 13, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Classic Footer: Add option to hide "0 notes" on posts

3 participants