Appearance
Global code is code that affects your entire website or web app.
Always make sure to use valid HTML using this HTML validator.
A good starting point is that your website or web app is readable and understandable without the use of CSS and JavaScript.
lang attribute
Use a lang attribute on the html element that matches the content. This helps assistive technology such as screen readers to pronounce content correctly.
https://www.w3.org/WAI/WCAG22/Understanding/language-of-page.html
Unique page title
Provide a unique title for each page or view. The title element, contained in the document's head element, is often the first piece of information announced by assistive technology. This helps tell people what page or view they are going to start navigating.
https://www.w3.org/WAI/WCAG22/Understanding/page-titled.html
Viewport zoom
Ensure that viewport zoom is not disabled. Some people need to increase the size of text to a point where they can read it. Do not stop them from doing this, even for web apps with a native app-like experience. Even native apps should respect Operating System settings for resizing text.
https://www.w3.org/WAI/WCAG22/Understanding/resize-text.html
Landmarks
Use landmark elements to indicate important content regions. Landmark regions help communicate the layout and important areas of a page or view, and can allow quick access to these regions. For example, use the nav element to wrap a site's navigation, and the main element to contain the primary content of a page.
https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html
Ensure a linear content flow
Remove tabindex attribute values that aren't either 0 or -1. Elements that are inherently focusable, such as links or button elements, do not require a tabindex. Elements that are not inherently focusable should not have a tabindex applied to them outside of very specific use cases.
https://www.w3.org/WAI/WCAG22/Understanding/focus-order.html
Avoid using the autofocus attribute
People who are blind or who have low vision may be disoriented when focus is moved without their permission. Additionally, autofocus can be problematic for people with motor control disabilities, as it may create extra work for them to navigate out from the autofocused area and to other locations on the page/view.
https://www.w3.org/WAI/WCAG22/Understanding/focus-order.html
Allow extending session timeouts
If you cannot remove session timeouts altogether, then let the person using your site easily turn off, adjust, or extend their session well before it ends.
https://www.w3.org/WAI/WCAG22/Understanding/timing-adjustable.html
Remove title attribute tooltips
The title attribute has numerous issues, and should not be used if the information provided is important for all people to access. An acceptable use for the title attribute would be labeling an iframe element to indicate what content it contains.