eBay MIND Patterns
  • Introduction
  • Messaging
    • Alert Dialog
    • Confirm Dialog
    • File Preview Card
    • Form Validation
    • Inline Notice
    • Input Meter
    • Input Validation
    • Page Notice
    • Star Rating (static)
    • Time
    • Toast Dialog
    • Tourtip
  • Input
    • Button
    • Checkbox
    • Chips Combobox
    • Combobox
    • Date Picker
    • File Input
    • Input Dialog
    • Listbox
    • Listbox Button
    • Menu
    • Menu Button
    • Phone Input
    • Radio
    • Select
    • Star Rating (interactive)
    • Switch
    • Toggle Button
    • Toggle Button Group
  • Navigation
    • Breadcrumbs
    • Fake Menu Button
    • Fake Tabs
    • Link
    • Pagination
    • Skip Navigation
    • Tile
  • Disclosure
    • Accordion
    • Carousel
    • Lightbox Dialog
    • Details
    • Flyout
    • Footnote
    • Infotip Button
    • Panel Dialog
    • Pulldown List
    • Segmented Buttons
    • Tabs
    • Tooltip
  • Structure
    • Description List
    • Form
    • Heading
    • Image
    • Item Tile
    • Layout Grid
    • Region
    • Table
    • Table Cell
  • Techniques
    • Active Descendant
    • Ambiguous Label
    • Background Icon
    • Keyboard Trap
    • Live Region
    • Offscreen Text
    • Roving Tabindex
    • Skip to Main Content
    • Alternative Text
  • Anti-Patterns
    • Disabling Pinch-to-Zoom
    • Hand Cursor on Buttons
    • JavaScript HREF
    • Layout Table
    • Mouse Hover on Static Elements
    • Open New Window
    • Setting Focus on Page Load
    • Tabindex-itis
    • Title Tooltip
  • Appendix
    • ARIA Essentials
    • Checklist
    • FAQ
    • Keyboard Interface
    • Known Issues
    • Legacy Patterns
      • Fullscreen Dialog
    • MIND Pattern Template
    • Pattern Naming Scheme
    • References
    • Utilities
Powered by GitBook
On this page
  • Disadvantages
  • Advantages
  • Exceptions
  1. Anti-Patterns

Setting Focus on Page Load

Most of the time... don't ever do this.

PreviousOpen New WindowNextTabindex-itis

Last updated 2 years ago

In typical web documents (as opposed to applications), setting keyboard focus on page load creates more disadvantages than advantages for users of assistive technology.

You must not set focus on page load without strong justification that it does not create a barrier for users of assistive technology.

Disadvantages

  • creates an inconsistency in navigation within the site/subsite since most pages do not set focus on page load

  • sighted keyboard users that rely on keyboard shortcuts for navigation (Page Down/Spacebar, End, etc.) will need to leave the context of the text input in order to navigate

  • screen reader users that rely on shortcuts for navigation will either need to leave the context of the input or exit "forms" mode in order to navigate

Advantages

  • mouse users are saved one click

  • can bring users attention to a critical error message

Exceptions

Specific MIND Patterns, such as , may direct you to set focus on page load for critical error cases.

Page Notice