8000
Skip to content

Forced Colors Mode WebDriver Emulation - #11823

Merged
svgeesus merged 5 commits into
w3c:mainfrom
alisonmaher:forced-colors-mode-web-driver
Apr 26, 2025
Merged

Forced Colors Mode WebDriver Emulation#11823
svgeesus merged 5 commits into
w3c:mainfrom
alisonmaher:forced-colors-mode-web-driver

Conversation

@alisonmaher
@alisonmaher alisonmaher commented Mar 4, 2025
Copy link
Copy Markdown
Collaborator

Forced Colors Mode is difficult to test via WPT because it is dependent on OS state (Window High Contrast) to trigger the feature to light up.

This change builds on a drafted webdriver-bidi emulation command (see w3c/webdriver-bidi#905) to define a new forced colors emulation (https://alisonmaher.github.io/alisonmaher/css-color-adjust-1/Overview.html#emualte-forced-colors-mode) that keeps track of the current forced colors mode emulation state.

The change also updates the forced colors mode algorithm (https://alisonmaher.github.io/alisonmaher/css-color-adjust-1/Overview.html#forced) to inform the UA what to do when the forced colors mode emulation state is either "light" or "dark".

CSSWG resolution for this change: #11824 (comment)

This change also fixes a few unrelated tabbing issues in the CSS Color Adjust 1 spec.

Comment thread css-color-adjust-1/Overview.bs Outdated
Comment thread css-color-adjust-1/style.css
@alisonmaher
alisonmaher marked this pull request as ready for review April 10, 2025 17:00
@alisonmaher
alisonmaher commented Apr 10, 2025
Copy link
Copy Markdown
Collaborator Author

Opening for official review given the resolution in #11824 (comment).

Thanks @tabatkins for already taking a look. @fantasai feel free to lmk if you have any feedback. In the meantime, I'll reach out to the WebDriver folks to see if they have any thoughts on this change.

@alisonmaher
Copy link
Copy Markdown
Collaborator Author
8000

Adding @shs96c in comment since I wasn't able to add as a direct reviewer.

He is one of the WebDriver spec editors, and said that the change looks good overall, but offered to take a closer look at the content of the change once back from vacation.

He also noted that there is a new version of the WebDriver spec:

"The only comment I would make is that the main focus on the Browser Tools and Testing WG is now WebDriver BiDi. Browser vendors are focusing on implementing that and not the “Classic” spec, so for adoption I’d suggest extending BiDi.

The main difference between the two is that while the original spec used URL templates and the verbs of HTTP, BiDi is event based, passing messages using a websocket. In terms of addding to the spec, I think either approach requires about the same amount of text."

So in the meantime, I'll look at the Bidi version of the spec and make the necessary updates to move over to that model

@alisonmaher
Copy link
Copy Markdown
Collaborator Author

An update for reviewers (@tabatkins, @fantasai, @shs96c, @svgeesus), I've updated this PR to be based on the webdriver bidi spec. All PR links in the description have been updated.

Based on existing Bidi modules, this seemed to fit nicely into the existing emulation module, which required a draft spec change in w3c/webdriver-bidi#905.

I'll inform the bidi spec owners of these PRs, as well, for review.

@svgeesus svgeesus left 8000 a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0