Skip to content
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

[Feature] Ability to mark elements to be hidden from the text version #179

Closed
dantman opened this issue Sep 26, 2019 · 3 comments
Closed

Comments

@dantman
Copy link

dantman commented Sep 26, 2019

Right now say I have a table layout with a text avatar:

<tr>
  <td class="message-avatar html-only">
    <span class="avatar text-avatar" aria-label="Avatar for John Smith">J</span>
  </td>
  <td class="message-sender">
    <p class="semantic">
      <span class="text-only" style="display: none;">Sent by: </span>
      John Smith
    </p>
  </td>
</tr>

Right now this will result in the very undesirable JSent by: John Smith instead of the desired Sent by: John Smith.

It would be much preferred if there was a css class, attribute, or just a filter function applied to every element that could be used to hide an element like a text avatar that is presentational only and should not end up in the text version.

@Niek
Copy link

Niek commented Mar 30, 2021

Related issue: #159

@KillyMXI
Copy link
Member

KillyMXI commented Jun 2, 2021

I've pushed new code addressing this issue into a separate branch - selectors
Tracking issue: #228

I'd be grateful if some of you can test this version on real tasks and provide your feedback before release (in a week probably).
(You can install the package directly from GitHub branch. Instruction is in the tracking issue.)

@KillyMXI
Copy link
Member

KillyMXI commented Jun 9, 2021

Version 8 is now live.
Arbitrary selectors can be ignored as follows:

{
  selectors: [
    { selector: 'foo.hidden', format: 'skip' }
  ]
}

@KillyMXI KillyMXI closed this as completed Jun 9, 2021
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

No branches or pull requests

3 participants