[jawsscripts] Re: UIA getting colour

  • From: Nick Allan <Nick.Allan@xxxxxxxxxxxxxxxxxxx>
  • To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Tue, 18 Apr 2017 02:22:18 +0000

Thanks for that. I don't need to worry about anything below jaws 18, so will 
give it a go.


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee
Sent: Tuesday, 18 April 2017 12:19 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: UIA getting colour

A tricky business in the presence of high-DPI laptops, and doubly so if you 
have to support old JAWS versions; but...

The UIAScriptAPI provides a BoundingRectangle() method on elements. Use that, 
then pick points inside that space to test for color. Beware though:

- The returned rectangle is 0-based, but getColorAtPoint() is 1-based.

- Pixel color tests are quite time-consuming on modern machines and Windows 
versions. I suggest trying to limit your tests to one or two pixels whenever 
possible.

I think DPI scaling issues are handled correctly by JAWS 17 and 18, not sure 
about 16. 15 and older may yield incorrect rectangle coordinates in some cases 
if I am not mistaken.

On Tue, Apr 18, 2017 at 01:33:30AM +0000, Nick Allan wrote:
Hi all
Is there any way using UIA to get the color of an object?
I've got some buttons that change their color to indicate if the function is 
active or not. Any suggestions welcome on the best way to test for color of a 
UIA object. The jaws cursor isn't able to see these controls.
Nick


Nick Allan
Access Technology Technical Lead
Business Transformation
Vision Australia
454 Glenferrie Rd Kooyong VIC 3144

T: 03 9864 9293 (I: 341293)
E: Nick.Allan@xxxxxxxxxxxxxxxxxxx
www.visionaustralia.org

[Vision Australia. Blindness. Low Vision.  Opportunity. - logo]

The history, culture, diversity and value of all Aboriginal and Torres Strait 
Islander peoples are recognised, acknowledged and respected.


__________???

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

--
Doug Lee, Senior Accessibility Programmer SSB BART Group - 
Accessibility-on-Demand mailto:Doug.Lee@xxxxxxxxxxxxxxxx  ;
http://www.ssbbartgroup.com "While they were saying among themselves it cannot ;
be done, it was done." --Helen Keller __________???

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: