Skip to content

[Bug] aria-hidden elements within post text are affected by css rule intended for UI elements #6909

@PetraOleum

Description

@PetraOleum

Describe the bug

Pandoc (and potentially other software) marks image captions with aria-hidden="true" to avoid screen reader software from reading duplicated text between the caption and the alt text of the image itself - see Pandoc#6491. Ironically when a post generated like this is loaded into freshrss (either via a fulltext feed or a css selector) the rule at frss.css#L412 applies overzelously and causes a user relying on sight (rather than a screen reader) to not see the caption at all.

To Reproduce

  1. Load a feed containing posts generated via pandoc 2.x (e.g. mine, which is what I'm testing - pardon my everything) that contain figcaption tags
  2. Inspect element on an image that is supposed to have a caption containing its alt text
  3. Observe that the figcaption element is greyed out

Figure construct in devtools in firefox

This works even if the <figcaption> is transformed into a regular <p> tag or similar changes - it's the aria-hidden="true" that is causing the issue.

Expected behavior

aria-hidden is supposed to hide an element and its children from screen readers, but not from visual inspection. The caption should be visible.

FreshRSS version

1.24.3

Environment information

I expect this won't matter, but:

  • Database version: Mysql 15.1
  • PHP version: PHP 8.1
  • Installation type: git
  • Web server type: nginx
  • OS: Manjaro rolling
  • Browser: Firefox 131

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug (unconfirmed)issues that could not be reproduced yetUI 🎨User Interfaces

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions