-
Notifications
You must be signed in to change notification settings - Fork 346
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
Stronger support / testing / best practices text on every example #1228
Comments
I agree that this would help authors make an informed decision before copy/pasting an example into production code. Unfortunately, authors often need this type of information right at point of use. I think the proposed text is close. I'd like to deconstruct it a bit, if I may, so that I can comment in detail. :)
We could use a shorter form of the warning (with only clauses 2 and 5 from above) for mature examples, which do not need to use the longer form. |
@carmacleod, words follow...
Strike "appropriate" and I am on board with that text. Or replace it with "idealized".
The problem is that today some of these will result in broken UIs and confusing experiences. Any code that relies on future feature development cannot be a best practice, it can only be aspirational.
I forgot about #633. I like #633..
Linking to the same resource twice feels like overkill, but if the text is different then I get a 2.4.4 Link Purpose panic. Regardless of the text we choose, I want to be careful not to make it any longer than I already have proposed. If possible. |
A fair amount of research goes into the APG design patterns and their code examples. I’d appreciate it if you didn’t undermine all of that work quite as much as you’re doing. Aside from that, we definitely should warn people. And all the work that’s going into the ARIA AT project will help us do that with a bit more poise than the warning crafted in this issue. |
I do not feel I am undermining anyone's work with this request. I am suggesting pointing to the document's own language in a warning. As a word, "appropriate" is a relative term with a meaning that shifts depending on perspective of the reader. "Idealized" tracks with what APG strives to be, meaning that word is less disputable regardless of the perspective of the reader. I am open to other language. |
Agree completely that ARIA AT will be extremely helpful, but - correct me if I am wrong - isn't that a fair ways down the road? I'm sorry if I am wrong - I haven't been following it closely. I also agree that we should warn people, and I think a warning "in situ" would be the best way to ensure that authors see it. We could even call it a Note (and not a warning), because that's basically the same thing but doesn't sound so dire. :) We don't want to chase people away, we just want them to note that certain patterns may not work "today".
Ok! So, "The purpose of this example is to illustrate use of ARIA as defined in the ARIA specification." 👍
Different sections. Clause 2 links to APG 2.2 and 2.3, clause 5 to APG 2.1 and possibly the First Rule (although I am not sure if we usually link into other spec docs directly, but we may be able to refer to the document itself in the "References" appendix as [Using-ARIA]).
Ok. So those (few?) widgets/examples that rely on "future features" can have the longer form of the warning. I just don't think we need to say "not necessarily best practices". :)
Can we revisit this thought? I looked quickly at the APG table of contents, and the ones I think may need more UA/AT support before being production ready are: ARIA 1.1 combo, feed, maybe treegrid? Possibly slider & spinbutton in VO (mentioned in #1150) and maybe others that are missing specific UA or AT support? So maybe there are fewer than I first thought? Are there any patterns in particular that you had in mind? |
[ animated thumbs up emoji ]
Ah. Oops. WFM.
While I am looking at "not necessarily best practices" not as a negative statement, but as a null statement, I understand your concern. Making the longer form on the future-feature widgets works for me as well. It just involves more effort to identify which those are and I suspect that is additional effort no one wants to spend (unless it is tracked already).
Yes, and definitely treegrid.
Non-data grid as well (I just opened an issue, and it touches on the need for the application role, fails to mention lack of Esc support). I would have to go back and review some (I recall running into issues with the alert dialog, but that may have been a couple years ago now). |
Some potential words.
Problems with the above note are:
|
I don't see the problems:
|
Fewer words:
I just removed the fluffy bits. |
Thanks! Authors are more likely to read the note if there are fewer words. ;) Converging...
|
I agree with most of this:
Here are some thoughts to chew on. Sentence 1
This statement feels a little too close to 1=1. Might the following, by including the phrases "illustrative example" and "one way", better convey the purpose of the note:
Sentences 2 and 3:
As discussed in #1150 and #1186, the only patterns where the development of new technologies are necessary are slider and possibly multi-select trees and tree grids. All other support gaps are due to one of the following:
Would the following be as effective?
Sentence 4
If the intent of this sentence is to get people to consider alternatives to the example, such as implementing an HTML-only variant, I don't feel like this will help. The sentence starts with the imperative to use semantic HTML, as if the example does not use semantic HTML. Perhaps we could be more clear about the reason for reading the material behind those links.
Complete proposal
One other point ... it is a little long. But, clarity is very important. One way we could keep the length from bing a problem is to collapse it with a summary/details element. Then, we could give it a more prominent ttreatment. The summary could be something like "Critical Note about Use of This Example". Perhaps that could be styled in a very prominent way. Then, we could place it right after the list of similar examples. |
Pruning a few words (from 106 words in 8 lines down to 98 words in 7 lines 😄 ):
Just for comparison purposes, here's the identical pruned content using bullets instead of a paragraph:
I think the bulleted list is easier to read, but either the paragraph or the bulleted list would work as |
Important Note About Use of This ExampleNote: This is an illustrative example of one way of using ARIA that conforms with the ARIA specification.
|
Proposal in prior comment ... this might be a kind of subtle point but wondering if we are implicitly endorsing copy/paste into production with that wording. instead of saying "considering use in production systems", should we say something like "considering emulating it in production code"? Or, maybe, before "basing production code on it?" |
I don't think so? ... we did say:
PS: Cool use of markup in a github comment! I thought comments had to be in markdown only. :) |
Remove "So,", and I am fine with this. The summary/details is fine IMO too. |
I deleted and retyped that "So," about 6 times. 😄 However, now that we seem to be converging on having bullet points instead of a paragraph of text, those 2 sentences are tied together by the fact that they are under the same bullet. Here it is again without the "So,": Important Note About Use of This ExampleNote: This is an illustrative example of one way of using ARIA that conforms with the ARIA specification.
|
@carmacleod My thumbs-up was meant to indicate that I am good with the language and suggested implementation. |
Thanks, @aardrian. Now that we have consensus, @a11ydoer has volunteered to submit a PR. :)
|
I didnot notice you mentioned me. I will submit a PR today. Thanks so much for all your hard work on this, @aardrian @carmacleod @JAWS-test @mcking65 |
I've done some work on the implementation of this in branch 1228-support-notice. Things that work:
Things that don't work:
Things that need to be done:
Relative URLsCan anyone help out with the relative URLs? The current setup doesn’t work due to the many different situations this document runs in: w3.org/TR/aria-practices/examples/app.js In addition, app.js is loaded from different levels of nesting in the examples folder: examples/button/button.html This is for both the |
@ZoeBijl var exLabel = document.getElementById('ex_label');
exLabel.parentNode.insertBefore(fragment, exLabel.nextSibling); I know it's really weird that you can use insertBefore to insertAfter... but if you "insert before an element's next sibling", that will actually insert after the element. And if there's no next sibling, it works like append. Hope this helps! |
@carmacleod woohoo, thanks! That did the trick. |
Because these patterns are often referenced via direct links to the example pages, users do not encounter the warnings that come at the start of the overall document. While there is a link at the start of each pattern, in my experience users are not clicking (or reading) before copying patterns into their own projects.
I recommend placing a very obvious warning at the start of each pattern that it is not tested with users, not tested across all browser/AT combinations (linking to 2.2 and 2.3), intentionally ignores the First Rule of ARIA (linking to the First Rule of ARIA), and is only a hypothetical application of ARIA (linking to 2.1).
I see from the 24 September call that some language has been discussed, but I feel it is not strong enough and reads only as a standard disclaimer.
This has overlap with #1150, but I feel goes further.
Proposed text:
The text was updated successfully, but these errors were encountered: