Skip to content

Instantly share code, notes, and snippets.

View davatron5000's full-sized avatar
🚀
Making Luro

Dave Rupert davatron5000

🚀
Making Luro
View GitHub Profile

How-to: Use role="application"

Summary: Use role="application" very sparingly, if at all.

NEVER use role="application" on a widely containing element such as <body> if your page consists mostly of traditional widgets or page elements such as links that the user does not have to interact with in focus mode. Using role="application" unnecessarily can cause huge headaches for any assistive technology user trying to use your site/application. Only put it on the <body> element if your page consists solely of a widget or set of widgets that all need the focus mode[^focusmode] to be turned on.

Do Use

  1. Use if your page has no resemblance to a classic document in roughly over 90% of its content
  2. Use clear labels within your application
layout title description categories
post
How-to: Future proof your accessibility efforts.
Ways to make your accessibility effort as future proof as possible.
How-tos
layout title description categories
post
How-to: Future proof your accessibility efforts.
Ways to make your accessibility effort as future proof as possible.
How-tos
struct もじれつ: Printable {
let description: String
init(string: String) {
var mutableString = NSMutableString(string: string) as CFMutableString
if CFStringTransform(mutableString, nil, kCFStringTransformLatinHiragana, 0) == 1 {
self.description = mutableString as NSString
} else {
self.description = string
}