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

Focus-Appearance rework #2281

Merged
merged 33 commits into from
Apr 27, 2022
Merged

Focus-Appearance rework #2281

merged 33 commits into from
Apr 27, 2022

Conversation

alastc
Copy link
Contributor

@alastc alastc commented Mar 22, 2022

Based on the recent meetings.

Preview the SC text and revised understanding doc.

To do: The updates to the AAA version.

Closes: #2219, #2222, #2226,


💥 Error: 500 Internal Server Error 💥

PR Preview failed to build. (Last tried on Apr 27, 2022, 9:01 PM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 Spec Generator - Spec Generator is the web service used to build specs that rely on ReSpec.

🔗 Related URL


😭  Sorry, there was an error generating the HTML. Please report this issue!
Specification: http://labs.w3.org/spec-generator/uploads/bnr0Mh?isPreview=true&publishDate=2022-04-27
ReSpec version: 32.1.4
File a bug: https://github.com/w3c/respec/
Error: Error: Evaluation failed: Timeout: document.respec.ready didn't resolve in 29140ms.
    at ExecutionContext._evaluateInternal (/u/spec-generator/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext.evaluate (/u/spec-generator/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async generateHTML (/u/spec-generator/node_modules/respec/tools/respecDocWriter.js:221:12)
    at async toHTML (/u/spec-generator/node_modules/respec/tools/respecDocWriter.js:92:18)
    at async Object.generate [as respec] (file:///u/spec-generator/generators/respec.js:15:44)
    at async file:///u/spec-generator/server.js:244:48

If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.

@bruce-usab
Copy link
Contributor

@alastc — Please see my comment in the Google doc. I believe a rigid reading of continuous for the encompasses definition to be problematic. I don't have a good suggestion, except to drop that adjective from the definition (which then leaves the possibility of a dashed border with too much empty space).

@alastc
Copy link
Contributor Author

alastc commented Mar 23, 2022

I believe a rigid reading of continuous for the encompasses definition to be problematic.

Hi @bruce-usab, remember that the exception is still based on area, so any non-continuous indicators would fall through to the exception (which doesn't use Encompasses).

@alastc alastc changed the title SC updates Focus-Appearance updates Mar 23, 2022
@bruce-usab
Copy link
Contributor

bruce-usab commented Mar 23, 2022

@alastc — I wrote something similar in the Google doc.

any non-continuous indicators would fall through to the exception

I do not agree that this is good enough, since the exception is part of the SC, not the definition.

On the survey, I asked: Does a UI like marching ants meets the definition for encompasses? (And I noted that I thought it did, and should.)

I was scribe, and I did not accurately track your reply on the call, my apologies, The reply I heard was, Yes, because of the exception. That was enough for me in that moment, since yes is what I expected to hear.

With the benefit of hindsight, I wish your answer had been more along the line of: No, but that is okay, because of the exception in the SC. That might have clued me in more (at the time of the call) to pick up on the detail that it is a significant problem to use encompasses with such a particular caveat, one which puts our use of the term outside the mainstream understanding of the word.

My suggestion is to move the continuous qualifier from the definition to the text of the SC.

@alastc
Copy link
Contributor Author

alastc commented Mar 23, 2022

On the survey, I asked: Does a UI like marching ants meets the definition for encompasses? (And I noted that I thought it did, and should.)

Ah, I had read that as: does it pass?

Ok, so this is whether the meaning of the word matches the intent. (CCing @mbgower )

The intent is to require a solid line because there is no reference to area (for simplicity), so without a solid line you could just have 4 dots around the corners and pass.

So does "encompasses" mean / imply a solid line? The dictionary definitions aren't particularly mathematical. I thought it did imply continuous, but a couple of people did not which is why we added "continuously" to the definition.

For what is supposed to be the simple part of the SC text, I'd rather not have two very overlapping words in the same sentence.

What about swapping "encompasses" with "surrounds"? The definition of Surrounds is "a thing that forms a border or edging round an object.", which to me implies continuous.

That would be:

When a user interface component has keyboard focus, the focus indicator:

  • surrounds the visual presentation of the user interface component

Definition:

Continuously encompasses, bounds or includes the whole of

@bruce-usab
Copy link
Contributor

bruce-usab commented Mar 23, 2022

Thanks @alastc.  I am more comfortable with a specialize particular meaning for surrounds than encompasses (but I cannot give a good explanation as to why I feel this way). I think it might be better not to have a defined term in this case, but I very much prefer what you propose above: surrounds in the SC, and encompasses as part of the definition for the glossary term.

I am totally behind the principle that 4 dots around the corners must not be a pass.

@mbgower
Copy link
Contributor

mbgower commented Mar 23, 2022

@bruce-usab My concern with using “surrounds” is that it fails to address some common outliers, such as a button that changes its color. By making the definition for “encompass” include “surrounds” as well as some related but distinct terms, we manage to tackle all those edge cases while maintaining a word that has a broader meaning than “surrounds” while including it. Hope that helps

since you've made it singular, the defined term in the anchor needs to be singular (which matches the glossary)
@alastc
Copy link
Contributor Author

alastc commented Mar 24, 2022

@mbgower That changing colour technique wouldn't pass the primary part of the SC anyway, that would fall through to the exception (and pass).

Bruce's point is just about which term matches the intent best, and I'm fairly ambivalent about that (I thought they both did, but others have said that 'encompasses' wasn't quite right).

@mbgower
Copy link
Contributor

mbgower commented Mar 24, 2022

That changing colour technique wouldn't pass the primary part of the SC anyway, that would fall through to the exception (and pass).

Why wouldn't it pass the primary?
If you have a grey button that contrasts 3:1 with a white background, and you make it black with white text, the pixels of the focus indicator contrast against themselves, and the black contrasts against the white background. Since the change "includes the whole of the" button, it meets the primary.

I was careful with that wording and definition, and this is the first I've heard of someone not liking "encompasses". We had quite a bit of discussion about that when the text was first broad forward. Encompasses typically means all the variations in the definition. Making it "surrounds" diminishes it, to me.

@bruce-usab
Copy link
Contributor

bruce-usab commented Mar 24, 2022

@mbgowerencompasses is a fancy word, so someone reading it (who knows what it means) would not expect WCAG to be especially unique with its usage. In contrast, surrounds is pedestrian, so WCAG adding it as a defined term but where we add the caveat that it means using a solid line/fill is is more defensible.

It is not good for an industry consensus document to use terms in ways that might be surprising. Most people would assume a dashed line can be used to encompass or surround or bound (or even circle).

My larger concern is patching a quirk with our defined term by using an exception in an SC. But since surrounds is (without being defined) kind of vague, I think it is okay to use as glossary term in this way.

How about using embiggen in the SC and glossary? I cannot think of a word that conveys that the indicator must be continuous.

@mbgower
Copy link
Contributor

mbgower commented Mar 24, 2022

someone reading it (who knows what it means) would not expect WCAG to be especially unique with its usage

It is not used in a unique way. It is a common usage of the term. I gave an example in our email thread. As well, it is a defined term. It's not difficult to understand the way WCAG is using it. You just click on the definition term and see a pithy 8 word definition.

I assume using "embiggen" is a joke? :) Otherwise, I'm not sure why you would propose replacing what you call a fancy word with a term i've never heard of which, when I looked it up, seems to have been first used on a Simpson's episode.

@mbgower
Copy link
Contributor

mbgower commented Mar 24, 2022

If the problem here is that you're trying to make it clear a dashed line fails, might I suggest:
"solidly bounds, surrounds or includes the whole of"

@bruce-usab
Copy link
Contributor

bruce-usab commented Mar 24, 2022

I am fine with solidly bounds, surrounds or includes the whole of — but it would be better for that to be in the SC. If we want solidly as part of the definition, then the term used needs to intuitively imply that characteristic.

I am fine with a dashed line failing the SC. I just think that it has to be that a dashed line fails against the SC metrics, not because a dashed line cannot be used to encompass something or go around a thing.

@mbgoweryour Britannica cite is an example of encompasses not being solid. In context, it is broad, but amorphous.

I used the Merriam Webster cite for embiggen, it is a perfectly cromulent word. My point is that it, for our context, it would better to use an unusual word rather than to ascribe an unusual characteristic to a common word. OTOH the word surrounds is vague enough that I think we can be excused for ascribing a particular specialized meaning.

@alastc
Copy link
Contributor Author

alastc commented Mar 24, 2022

this is the first I've heard of someone not liking "encompasses".

I just meant that a couple of people didn't think it implied solid.

Why wouldn't it pass the primary?

I read encompasses to mean going around something, not inside it. Also the definition includes surrounds/bounds.

I am fine with a dashed line failing the SC. I just think that it has to be that a dashed line fails against the SC metrics, not because a dashed line cannot be used to encompass something or "go around a thing".

and

If the problem here is that you're trying to make it clear a dashed line fails, might I suggest:
"solidly bounds, surrounds or includes the whole of"

The crux is that the first part of the SC does not include the (more complex) size metrics, so there is no differentiation between a (passing) thicker dashed line, and 4 dots on the corners. Therefore that part of the SC is not going to have the nuance to pass a dotted line.

So we need a simple word/words that equates to a solid line around the component for that first part.

Bruce and Gundula seem set on including that in the SC text. I can't see another single word that is better, so that would be:

continuously encompasses the visual presentation of the user interface component

@bruce-usab
Copy link
Contributor

continuously encompasses the visual presentation of the user interface component

I think that is fine.

Just for clarification, it is not that I am set on including that in the SC text. I am set against ascribing a glossary term unconventional meaning. Since I cannot think of a better word than "encompasses", then moving "continuously" into the SC text seems like the least bad approach to me.

@mbgower
Copy link
Contributor

mbgower commented Mar 24, 2022

"Continuously encompass" just seems awkward to me.
There may not be a way of wording this elegantly. Do we have to resort to "surrounds the visual presentation of the user interface component with an unbroken line"? I find that overly prescriptive, personally.

For my money "solidly bounds, surrounds or includes the whole of" as a definition of encompasses is pretty good.

@bruce-usab
Copy link
Contributor

bruce-usab commented Mar 24, 2022

@mbgower — "solidly bounds, surrounds or includes the whole of" is fine as a concept. It is not fine as definition for "encompasses" because only a minority of people using that word would presume "solidly". The fact that we dare not leave encompasses undefined illustrates why there is a problem. We would not be using "encompasses" with "its ordinarily accepted meaning in the sense that the context implies." See: E103.2 Undefined Terms.

This is where I believe we are with the top half of the SC:

When a user interface components has keyboard focus, the focus indicator:

  • Encompasses the visual presentation of the user interface component;
  • Has a contrast ratio of at least 3:1 between its pixels in the focused and unfocused states;
  • Has a contrast ratio of at least 3:1 against adjacent colors.

So how about instead:

When a user interface components has keyboard focus, the focus indicator:

  • Solidly bounds, surrounds or includes the whole of the visual presentation of the user interface component;
  • Has a contrast ratio of at least 3:1 between its pixels in the focused and unfocused states;
  • Has a contrast ratio of at least 3:1 against adjacent colors.

mbgower added 2 commits March 25, 2022 15:49
First draft involving encompasses. I've also added the heading for the second of the primary considerations
This is an attempt to see what the use of "encloses" does to the Understanding document. All the images are temporary (since they are poorly screen captured pngs)
@mbgower
Copy link
Contributor

mbgower commented Mar 28, 2022

See both #2283 and #2284 for variations on this

Copy link
Contributor

@bruce-usab bruce-usab left a comment

Choose a reason for hiding this comment

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

With this PR, I am still seeing encompasses as a defined term with solidly as a required characteristics. That detail goes above and beyond usual meaning of the wordr.

But I am also seeing definitions for focus and perimeter which I am comfortable with. So I am not confident that I looking at the most recent version.

@mbgower
Copy link
Contributor

mbgower commented Mar 29, 2022

@bruce-usab most up to date of my proposed changes are in 2284 (linked in my last comment). Note that they are cumulative, so it helps to look at 2283 first to see the progression from 2281

@alastc alastc changed the title Focus-Appearance updates Focus-Appearance rework Apr 1, 2022
alastc and others added 2 commits April 1, 2022 16:49
incorporated the discussion points from today
mbgower and others added 24 commits April 1, 2022 13:50
minor tweaking to improve read through
minimal changes to term styling
substantial modifications of the Understanding to make the reading flow and the page narrative progressive.
Repositioned some material to improve flow. Made additional minor edits. Reviewed up to "Unusual shapes and gradients"
Updated the final exception bullets. I believe this is ready for a read through by someone else.
matched language of ACT for bounding box non-rotated/non-skewed langauge, as per @WilcoFiers request
Adding a modification to the new Focus Not Obscured SC from #2204
updated Understanding document to match normative change
Minor wordsmithing to correct typos and better align text
Changes to normative language to match changes in Understanding
resolving comments on axis
first draft at tackling perceived component
removing the now discarded focus definition
Massive update to content in an attempt to work in working examples and guidance for complex components. Will need to be revised but serves as a starting point
Changes to figure captions for consistency, as well as mild editorial tweaks and addition of image placeholders
Rewrite of adjacent contrast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify what is meant by "When user interface components receive keyboard focus," in SC 2.4.11
4 participants