ucfopen / UDOIT

The Universal Design Online content Inspection Tool, or UDOIT (pronounced, “You Do It”) enables faculty to identify accessibility issues in their Learning Management System. It will scan a course, generate a report, and provide resources on how to address common accessibility issues.
GNU General Public License v3.0
108 stars 65 forks source link

Add guardrails against transparent background color #919

Closed taheralfayad closed 3 months ago

taheralfayad commented 1 year ago

Fixes #908 Note: These changes solve this issue independent of the corresponding changes made to phpally in this pull request.

Issue:

As of recent, UCF instructional designers have been complaining about a bug that flags HTML elements with the background-color: transparent style as having insufficient contrast with their background. A pull request was recently made to address this particular issue in phpally, making any elements with the transparent style inherit the background color of their parent element. The changes in the phpally pull request successfully got rid of the false positives, however, they could not address the scenario where there might actually be some color contrast issues. This is where this pull request comes in.

Solution:

To address this issue, the changes made in this pull request will at first scan the HTML of any canvas page to look for any elements with the background-color: transparent style. If such elements are found, then UDOIT will change the HTML elements to inherit the background color of their parent element, which allows the user to change the true background color of the elements, and resolve any contrast issues resulting from them.

dmols commented 3 months ago

We opted to find a better solution for this that doesn't involve altering HTML without the instructors' explicit approval. Will be making an issue to address this, for us to revisit in the future.