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

2.4.11: Definition of perimeter is not consistent #2249

Closed
JAWS-test opened this issue Mar 4, 2022 · 7 comments
Closed

2.4.11: Definition of perimeter is not consistent #2249

JAWS-test opened this issue Mar 4, 2022 · 7 comments

Comments

@JAWS-test
Copy link

Definition of perimeter is not consistent:

  • there is a purely mathematical definition that uses perimeter (e.g. 2𝜋r for circle, 2h+2w for rectangle). This is stated in the definition as applicable to the circle
  • there is a technical definition that uses the actual pixels used (e.g. 2h+2w-4 - and anything for the circle, but never 2𝜋r and probably usually not 2𝜋r rounded up or down). This is stated in the definition as applying to the rectangle.
  • It remains unclear which method should be used for which element (e.g. for a rectangle with rounded corners)

I would be in favor of using a consistent method. Since both methods are too difficult for complex figures, my suggestion would be that we only ever use the minimum bounding box.

Related: #1324, #2222

@patrickhlauke
Copy link
Member

patrickhlauke commented Mar 4, 2022

while it's nice to go for simplicity (for an auditor/tester), oversimplifications like that lead to illogical requirements. "why does my outline/border need to be thicker just because my shape isn't rectangular? do people with disabilities have trouble recognising shapes that are not rectangles?"

@JAWS-test
Copy link
Author

do people with disabilities have trouble recognising shapes that are not rectangles?"

No, not at all. Rather, I think it makes the test more difficult. But anyway: What is important to me is that perimeter is defined unambiguously and not in 2 different ways (mathematical and pixel-based).

@patrickhlauke
Copy link
Member

oh for sure, agree that there should be one clear definition of what is meant by perimeter. just throwing in that i'd hate to see the one definition being used be the one that's "simple" but illogical

@alastc
Copy link
Contributor

alastc commented Mar 4, 2022

So the latest proposal (in the survey for discussion next week) doesn't use that definition. That's a proposal + discussion + test cases.

I'm not sure if the question is still relevant if that proposal is approved? The first method is to use an indicator that 'encompasses' the component, but (with an assumption you can't have less than a 1px thickness) it doesn't try to set a minimum area, it just has to go around (i.e. not inside) the component.

That should be straightforward to calculate. However, if it doesn't meet that, you'd need to fall-back to the exception with the 4px * shortest-side approach.

my suggestion would be that we only ever use the minimum bounding box.

That can lead to some odd results, such as in #2222 where the same indicator fails on a circle when it passes on a rectangle.

@patrickhlauke
Copy link
Member

so just to be crystal, the actual perimeter of a circular or triangular or whatever control would "encompass" the control, right?

@alastc
Copy link
Contributor

alastc commented Mar 4, 2022

the actual perimeter of a circular or triangular or whatever control would "encompass" the control

Yes. It would need to be the pixel outside of the component, rather than on the component, but see the doc for a discussion of interpreting UIC for size & active descendants.

@patrickhlauke
Copy link
Member

perfect, thanks @alastc

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

No branches or pull requests

3 participants