• Start Date: 2020-06-24
  • Relevant Team(s): Ember CLI
  • RFC PR: (after opening the RFC PR, update this with a link to it and update the file name)
  • Tracking: (leave this empty)
  • Authors: Benjamin Jegard, Melanie Sumner, Ricardo Mendes

Add ember-page-title to the app blueprint

Summary

Add ember-page-title to the default blueprint for new Ember apps as a way to provide improved out-of-the-box (OOB) accessibility for Ember applications.

Motivation

This RFC is part of the work made by the Ember.js Accessibility Strike Team to ensure that newly created ember apps have no accessibility issues.

Users with assistive technology rely on the page title to know if they are on the correct page of a website. Adding this addon will provide developers a simple solution to achieve the WCAG Success Criterion 2.4.2: Page Titled.

While there're other addons that provide the same capabilities it has been decided to go with ember-page-title because it's the most aligned with the current and future direction taken Ember, which is the template-based solution.

Detailed design

  1. Make ember-page-title an official Ember addon by transferring ember-page-title repo to the Ember CLI org (it's currently in the Adopted Ember Addons org)
  2. Add the dependency to the app blueprint here: https://github.com/ember-cli/ember-cli/blob/master/blueprints/app/files/package.json#L19
  3. Update route blueprint to include {{page-title RouteName}} at the top of the route template.hbs (this template.hbs too) where RouteName is the name of the route provided to the ember generate route command

How we teach this

  • Update the "Page Title" section in Page Template Considerations to use ember-page-title.
  • Update code examples in Building Pages to include uses of {{page-title}}. Also explain that updating the page title with the current page name will help users with assistive technology locate themself on the website.
  • Update ember-welcome-page addon and WelcomePage component to explain the contents of the fresh project a bit better. The component should explain the presence of {{page-title}} and link to the "Page Title" section in Page Template Considerations

Drawbacks

  • An additional dependency to new projects. But, no noticeable size differences it's only all +10kb of js for production builds (not gzipped, ~2kb js gzipped)
  • Add an extra helper {{page-title}} (possible name clashing)
  • Slightly increases the learning curve. Increases the amount of code in a first-starter project, which could become overwhelming.
  • The addon will have to be maintained by the Ember CLI org

Alternatives

N/A

Unresolved questions

None

References