Repository navigation
Create an "accessible by default" principle. #616
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
Open
jyasskin
wants to merge
3
commits into
main
Choose a base branch
from
accessible-by-default
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -297,20 +297,40 @@ necessary. | |||||||||||||
| Use short-lived, temporary identifiers | ||||||||||||||
| unless a persistent identifier is absolutely necessary. | ||||||||||||||
|
|
||||||||||||||
| <h3 id="devices-platforms">Support the full range of devices and platforms (Media Independence)</h3> | ||||||||||||||
| <!-- was "Media Independence" in the HTML Design Principles --> | ||||||||||||||
| <h3 oldids="css-content-should-be-visible,devices-platforms" | ||||||||||||||
| id="accessible-by-default">Content should be accessible and widely usable by default</h3> | ||||||||||||||
|
|
||||||||||||||
| As much as possible, | ||||||||||||||
| ensure that features on the web work across different input and output [devices, | ||||||||||||||
| screen sizes, interaction modes, platforms, and media](https://www.w3.org/TR/ethical-web-principles/#multi). | ||||||||||||||
| An inattentive developer should, by default, | ||||||||||||||
| produce content that the widest possible set of users can interact with, | ||||||||||||||
| whether or not they have the [[ethical-web-principles#multi|devices, software]], | ||||||||||||||
| or [[ethical-web-principles#allpeople|abilities]] that the developer tested against. | ||||||||||||||
| That is, the simplest ways to use HTML, CSS, and JavaScript should produce content that is | ||||||||||||||
| [[wcag22#perceivable|perceivable]], [[wcag22#operable|operable]], and [[wcag22#robust|robust]]. | ||||||||||||||
|
|
||||||||||||||
| One of the main values of the Web is that it's extremely flexible: | ||||||||||||||
| a Web page may be viewed on virtually any consumer computing device | ||||||||||||||
| at a very wide range of screen sizes, | ||||||||||||||
| may be used to generate printed media, | ||||||||||||||
| and may be interacted with in a large number of different ways. | ||||||||||||||
| New features should match the [existing flexibility](https://www.w3.org/TR/ethical-web-principles/#render) | ||||||||||||||
| of the web platform. | ||||||||||||||
| a user can choose to view a web page on | ||||||||||||||
| almost any device (including paper), interaction modality, and screen size, | ||||||||||||||
| using browsers that make a range of interface choices, | ||||||||||||||
| with assistive technology to support their individual disabilities. | ||||||||||||||
|
|
||||||||||||||
| Developers often have limited time | ||||||||||||||
| and don't test with all of the options that users will need to choose. | ||||||||||||||
|
Comment on lines
+316
to
+317
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bkardell How about:
Suggested change
|
||||||||||||||
| Design features to preserve and improve | ||||||||||||||
| the [[ethical-web-principles#render|existing flexibility]] | ||||||||||||||
| and accessibility of the web platform, | ||||||||||||||
| even when used by hasty developers. | ||||||||||||||
|
|
||||||||||||||
| It should take sophistication and non-default attributes, properties, and arguments | ||||||||||||||
| to create pages that exclude some users, | ||||||||||||||
| rather than requiring sophistication to include everyone. | ||||||||||||||
|
|
||||||||||||||
| <div class="example"> | ||||||||||||||
| For example, the default behavior of all layout systems in CSS will not lead to content being clipped, | ||||||||||||||
| content overlapping other content, or content being unreachable by scrolling. | ||||||||||||||
|
bkardell marked this conversation as resolved.
Resolved
Comment on lines
+328
to
+329
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To address https://github.com/w3ctag/design-principles/pull/616/changes#r3391475050, perhaps:
Suggested change
|
||||||||||||||
| These things should only happen if CSS features are used that are more explicitly choosing | ||||||||||||||
| such a behavior (for example, `overflow: hidden` or `left: -40em`). They should not happen by | ||||||||||||||
| default as a result of something like `display: flex` or `position: relative`. | ||||||||||||||
| </div> | ||||||||||||||
|
|
||||||||||||||
| <div class="note"> | ||||||||||||||
| This doesn't imply that features which don't work in *every* possible context should be excluded. | ||||||||||||||
|
|
@@ -323,18 +343,6 @@ and can be adapted to devices that don't support their original intent - | |||||||||||||
| for example, a tap on a mobile device will fire a ''click'' event as a fallback. | ||||||||||||||
| </div> | ||||||||||||||
|
|
||||||||||||||
| Features should also be designed so that the easiest way to use them | ||||||||||||||
| maintains flexibility. | ||||||||||||||
|
|
||||||||||||||
| <div class="example"> | ||||||||||||||
| The 'display: block', | ||||||||||||||
| 'display: flex', | ||||||||||||||
| and 'display: grid' layout models in CSS | ||||||||||||||
| all default to placing content within the available space and without overlap, | ||||||||||||||
| so that it works across screen sizes, | ||||||||||||||
| and allows users to choose their own font and font size without causing text to overflow. | ||||||||||||||
| </div> | ||||||||||||||
|
|
||||||||||||||
| Sometimes features aren't yet available on some implementations or platforms | ||||||||||||||
| despite working on others. | ||||||||||||||
| In these cases, features should be designed such that it is possible for | ||||||||||||||
|
|
@@ -1517,19 +1525,6 @@ since properties are generally setting a mode or state. | |||||||||||||
|
|
||||||||||||||
| See [[#naming-is-hard]] for general (cross-language) advice on naming. | ||||||||||||||
|
|
||||||||||||||
| <h3 id="css-content-should-be-visible">Content should be viewable and accessible by default</h3> | ||||||||||||||
|
|
||||||||||||||
| Design CSS properties or CSS layout systems (which are typically values of the `display` property), | ||||||||||||||
| to preserve the content as viewable, accessible and usable by default. | ||||||||||||||
|
|
||||||||||||||
| <div class="example"> | ||||||||||||||
| For example, the default behavior of all layout systems in CSS will not lead to content being clipped, | ||||||||||||||
| content overlapping other content, or content being unreachable by scrolling. | ||||||||||||||
| These things should only happen if CSS features are used that are more explicitly choosing | ||||||||||||||
| such a behavior (for example, `overflow: hidden` or `left: -40em`). They should not happen by | ||||||||||||||
| default as a result of something like `display: flex` or `position: relative`. | ||||||||||||||
| </div> | ||||||||||||||
|
|
||||||||||||||
| <h2 id="js">JavaScript Language</h2> | ||||||||||||||
|
|
||||||||||||||
| <h3 id="js-only">Use JavaScript for Web APIs</h3> | ||||||||||||||
|
|
||||||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be rephrased. It's not just about limited time, it's limited ability - developers don't have every device, and can't. New devices are introduced that developers could not even in a perfect world have considered because they didn't exist at the time. I'm not sure also what "that users will need to choose" means.
Maybe this is just trying to say
But I don't think it's actually necessary? Maybe we can just remove that sentence?