No subject


Tue May 3 15:05:30 PDT 2016


This is in Safari Tech Preview 22 on OS X 10.12.3. The reduced motion query does not appear to work in the current WebKit nightly (is that also a bug?)

Summary:
MediaQueryList instances (created with `window.matchMedia(query)`) for the CSS `prefers-reduced-motion` query do not update their `matches` property or dispatch event listeners when the underlying system status changes. New instances do get the correct current value.

Steps To Reproduce:
1. Ensure “reduce motion” is off in OS X accessibility settings
2. Create a query, check its status, and add a listener with the following JS:

    var prefersReducedMotion = matchMedia(`(prefers-reduced-motion)`);
    prefersReducedMotion.matches; // false
    prefersReducedMotion.addListener(function () {
      var currentValue = prefersReducedMotion.matches;
      console.log(`Motion changed: ${currentValue ? `reduced` : `normal`}`);
    });

3. Change motion preferences in the OS X accessibility settings panel

Expected Result:
The message “Motion changed: reduced” should have been logged to the console. Checking the JS `prefersReducedMotion.matches` should be `true`.

Results:
Nothing is logged. Checking `prefersReducedMotion.matches` is `false`.
However, creating a new query yields `true`:
    matchMedia(`(prefers-reduced-motion)`).matches; // true

-- 
You are receiving this mail because:
You are the assignee for the bug.

--Boundary_(ID_4APmJzCBN7ZOXiH0sC81/Q)
Date: Fri, 17 Mar 2017 15:58:38 -0700
MIME-version: 1.0
Content-type: text/html
Content-transfer-encoding: 8BIT

<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MediaQueryList instances do not update for `prefers-reduced-motion`"
   href="https://bugs.webkit.org/show_bug.cgi?id=169835">169835</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MediaQueryList instances do not update for `prefers-reduced-motion`
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Accessibility
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dino&#64;apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>webkit-bug-importer&#64;group.apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>From Rob Brackett

This is in Safari Tech Preview 22 on OS X 10.12.3. The reduced motion query does not appear to work in the current WebKit nightly (is that also a bug?)

Summary:
MediaQueryList instances (created with `window.matchMedia(query)`) for the CSS `prefers-reduced-motion` query do not update their `matches` property or dispatch event listeners when the underlying system status changes. New instances do get the correct current value.

Steps To Reproduce:
1. Ensure “reduce motion” is off in OS X accessibility settings
2. Create a query, check its status, and add a listener with the following JS:

    var prefersReducedMotion = matchMedia(`(prefers-reduced-motion)`);
    prefersReducedMotion.matches; // false
    prefersReducedMotion.addListener(function () {
      var currentValue = prefersReducedMotion.matches;
      console.log(`Motion changed: ${currentValue ? `reduced` : `normal`}`);
    });

3. Change motion preferences in the OS X accessibility settings panel

Expected Result:
The message “Motion changed: reduced” should have been logged to the console. Checking the JS `prefersReducedMotion.matches` should be `true`.

Results:
Nothing is logged. Checking `prefersReducedMotion.matches` is `false`.
However, creating a new query yields `true`:
    matchMedia(`(prefers-reduced-motion)`).matches; // true</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>

--Boundary_(ID_4APmJzCBN7ZOXiH0sC81/Q)--


More information about the webkit-unassigned mailing list