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
  • Using an Icon
  • References
  1. Anti-Patterns

Open New Window

Let the user control their browser window/tab stack.

PreviousMouse Hover on Static ElementsNextSetting Focus on Page Load

Last updated 2 years ago

Forcing links to open in a new window is an anti-pattern because we are taking control away from the user and forcing web-browsing behaviour upon them. If a user wishes to open a link in a new window, they can do so by using their mouse or keyboard shortcut, without our intervention.

If you must create a link that opens in a new window, screen reader users must be pre-warned of the behaviour. We achieve this with clipped suffix text:

<a href="http://www.ebay.com/shop" target="_blank">
    Shop Now<span class="clipped"> - opens in new window or tab</span>
</a>

Using an Icon

Ideally we should also warn sighted users of this behaviour. We can do this by adding the text to a foreground image:

<a href="http://www.ebay.com/shop" target="_blank">
    Shop Now<img src="new-window-icon.jpg" alt=" - opens in new window or tab" />
</a>

Alternatively, using a CSS background image:

<a href="http://www.ebay.com/shop" target="_blank">
    Shop Now<span aria-label=" - opens in new window or tab" class="icon-new-window" role="img"></span>
</a>

References

Pattern : Link
Technique: Clipped Text