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 Request] EvTable Enhanced Screenreader Support #3515

Closed
jaborsh opened this issue Apr 22, 2024 · 4 comments
Closed

[Feature Request] EvTable Enhanced Screenreader Support #3515

jaborsh opened this issue Apr 22, 2024 · 4 comments
Labels
feature-request A suggestion for new functionality.

Comments

@jaborsh
Copy link
Contributor

jaborsh commented Apr 22, 2024

Describe the solution you'd like

Currently, EvTable formats its rows/columns in such a way that is unfriendly for screenreaders.

image

In this image, the Description portion of the row wraps into multiple lines. While this is perfect for visual users, it is less-so for those using screenreaders, as the second line will be read AFTER the status report. We should implement a method to negate this multi-line wrapping for screenreader users. The crop method in EvCell is a sub-optimal workaround for the time being as the entirety of the text will not display.

@jaborsh jaborsh added feature-request A suggestion for new functionality. needs-triage Yet to be looked at and verified as an a real issue/feature that could be worked on labels Apr 22, 2024
@InspectorCaracal
Copy link
Contributor

While I don't have anything against the suggestion, I think it would likely be simpler to do a check on the user's protocol in your code and simply not use an EvTable for those with the screenreader flag. The entire functional purpose of EvTable is visual formatting: if you don't need the visual formatting, you don't need the table.

@chiizujin
Copy link
Contributor

I don't really know much about the requirements of a screen reader but if you did want something to "unwrap" the table you could pass it through the function below and send the returned string to the client instead of sending the table. Though, as InspectorCaracal says, this would be doing the work then undoing it again instead of just bypassing the EvTable:

def un_evtable(table, row_numbers=False):
    string = ""
    for i in range(table.nrows):
        row = [col[i] for col in table.worktable]
        if row_numbers:
            string += f"Row {i + 1}\n"
        for cell in row:
            cell_string = " ".join([data.clean() for data in cell.data])
            if cell_string:
                string += cell_string + "\n"
    return string.rstrip()

This creates a string with one line per cell, in row order.

@Griatch Griatch removed the needs-triage Yet to be looked at and verified as an a real issue/feature that could be worked on label Apr 27, 2024
@Griatch
Copy link
Member

Griatch commented Apr 27, 2024

In principle, the EvTable's output could implement something like the solution @chiizujin has here, just swapping to it when in screenreader mode. Kinda cumbersome to add that across all commands though.

@jaborsh jaborsh closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
@jaborsh
Copy link
Contributor Author

jaborsh commented May 6, 2024

Marked as not planned given the alternative solution of handling directly instead of creating a method to essentially invalidate the entire point of EvTable to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A suggestion for new functionality.
Projects
None yet
Development

No branches or pull requests

4 participants