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

Windows 10 Action Center: Brightness percentage not reported for brightness quick action #8845

Closed
jcsteh opened this Issue Oct 15, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@jcsteh
Copy link
Contributor

jcsteh commented Oct 15, 2018

Steps to reproduce:

  1. Ensure the Brightness quick action is enabled for the Action Center. This can be enabled in Settings -> System -> Notifications & actions -> Add or remove quick actions.
  2. Open Action Center by pressing Windows+a.
  3. Tab to the quick actions and press right arrow until you land on Brightness.
    • Expected: NVDA should report the brightness percentage.
    • Actual: NVDA reports only "Brightness toggle button not pressed".
  4. Press space to change the brightness.
    • Expected: NVDA should report the new brightness percentage.
    • Actual: NVDA reports nothing.

System configuration:

NVDA Installed/portable/running from source:

Installed.

NVDA version:

alpha-16157,526d6fca

Windows version:

Version 1809 (OS Build 17763.55)

Additional info:

Even though Windows reports this as a toggle button, it isn't. The toggle state is always off. Narrator behaves as such too.

The percentage is exposed via the ItemStatus UIA property. IMO, this is inda weird, but at least it's exposed.

Because of the weirdness of this control, I'd suggest that rather than generically supporting ItemStatus as value for toggle buttons, we should just do it for this control (or at least this app). If we do it specifically for this control, we could also map it to button instead of toggle button, which is probably less confusing.

Relevant dev info for the control:

appModule: <'shellexperiencehost' (appName u'shellexperiencehost', ...>
UIA automationID: Microsoft.QuickAction.Brightness
UIA frameworkID: XAML
UIA providerDescription: [pid:17568,providerId:0x0 Main(parent link):Unidentified Provider (unmanaged:Windows.UI.Xaml.dll)]
UIA className: ToggleButton
UIA patterns available: LegacyIAccessiblePattern, InvokePattern, ScrollItemPattern, TogglePattern
@josephsl

This comment has been minimized.

Copy link
Collaborator

josephsl commented Oct 16, 2018

Hi,

Note that this is also applicable to Focus Assist toggle state changes.

Technical: one way to implement this is through a combination of runtime object property coercion (event_NVDAObject_init) and state change events.

I'll introduce a proof of concept implementation in Windows 10 App Essentials in the next 30 minutes.

Thanks.

@josephsl

This comment has been minimized.

Copy link
Collaborator

josephsl commented Oct 16, 2018

Hi,

I may have been too enthusiastic about this... This work may take a while - at least managed to let NVDA announce item status via state change, but will need to investigate why it is announcing the previous state sometimes.

Thanks.

@josephsl

This comment has been minimized.

Copy link
Collaborator

josephsl commented Oct 16, 2018

Hi,

Technical: we need to tell NVDA to listen to item status property event from now on, as it can be used for brightness and other quick action toggle announcements.

Pull request to be sent in the next few days.

Thanks.

josephsl added a commit to josephsl/nvda that referenced this issue Nov 17, 2018

UIA handler: add item status property change event. Re nvaccess#8845.
Some controls raise UIA item status property change event, allowing clients to announce status changes. This is most noticeable in Windows 10's Action Center where one can change brightness and Focus Assist (quiet hours) where toggling these controls will cause them to raise this event.

josephsl added a commit to josephsl/nvda that referenced this issue Nov 17, 2018

Shell Experience Host: announce status changes for various Action Cen…
…ter controls. Re nvaccess#8845.

Thanks to UIA's item status property change event, status for the following will be announced when toggling them:
* Brightness
* Focus Assist/quiet hours

Because item status property change is raised multiple times (or rather, NVDA announces status messages multiple times), have a string to hold last announced status.

josephsl added a commit to josephsl/nvda that referenced this issue Nov 17, 2018

Shell Experience Host: Brightness button is now a plain button, not a…
… toggle button. Re nvaccess#8845.

Brightness button is now a plain button, not a toggle button. Note that this control is now a slider in Windows 10 19H1 build 18277 and later.

josephsl added a commit to josephsl/nvda that referenced this issue Nov 28, 2018

UIA item status: address review comments. Re nvaccess#8845.
Comment: make it more professional.
_itemStatusMessage -> _itemStatusMessageCache for readability.

josephsl added a commit to josephsl/nvda that referenced this issue Jan 8, 2019

Action Center/toggle button: address review comments. Re nvaccess#8845.
Reviewed by Mick Curran (NV Access): tweaks and changes:
* An overlay class will be used to handle toggle button value change state.
* Current item status cache will now be part of the new toggle button overlay class.

josephsl added a commit to josephsl/nvda that referenced this issue Jan 9, 2019

@nvaccessAuto nvaccessAuto added this to the 2019.1 milestone Jan 10, 2019

michaelDCurran added a commit that referenced this issue Jan 10, 2019

Windows 10/Action Center: announce item status messages for brightnes…
…s, focus assist and others, as well as reclassify brightness control as a button (#8954)

* UIA handler: add item status property change event. Re #8845.

Some controls raise UIA item status property change event, allowing clients to announce status changes. This is most noticeable in Windows 10's Action Center where one can change brightness and Focus Assist (quiet hours) where toggling these controls will cause them to raise this event.

* App modules/Shell Experience Host: copyright header edits, add top-level docstring.

* Shell Experience Host: announce status changes for various Action Center controls. Re #8845.

Thanks to UIA's item status property change event, status for the following will be announced when toggling them:
* Brightness
* Focus Assist/quiet hours

Because item status property change is raised multiple times (or rather, NVDA announces status messages multiple times), have a string to hold last announced status.

* Shell Experience Host: Brightness button is now a plain button, not a toggle button. Re #8845.

Brightness button is now a plain button, not a toggle button. Note that this control is now a slider in Windows 10 19H1 build 18277 and later.

* Shell Experience Host/item status: clarify comment.

* UIA item status: address review comments. Re #8845.

Comment: make it more professional.
_itemStatusMessage -> _itemStatusMessageCache for readability.

* Update copyright years

* Action Center/toggle button: address review comments. Re #8845.

Reviewed by Mick Curran (NV Access): tweaks and changes:
* An overlay class will be used to handle toggle button value change state.
* Current item status cache will now be part of the new toggle button overlay class.

* Action Center toggle button object: address review comment - assign cache no matter what the new value is. Re #8845.

* Update what's new.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.