amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Add ability to override aria-label in carousel

Open erwinmombay opened this issue 11 years ago • 4 comments

First Timers Only

We know figuring out the process for contributing to an open source project can be intimidating, so we created this issue as a way for you to learn the ropes. (If you feel comfortable contributing to open source projects, please leave this issue for someone else.)

This particular starter issue is designed to familiarize you with the AMP Code Contribution process by adding a simple feature to one of AMP components.

Background

<amp-carousel> component has two buttons for navigating to next/previous slides. It uses aria-label to provide alternative text for these buttons as needed for accessibility. However the values for these labels are hard coded and not configurable.

screenshot from 2017-04-28 13 28 16

Motivation

We like to allow page authors to optionally change the value of these labels for localization or customization purposes.

What to do

amp-carousel should accept two new attributes data-next-button-aria-label and data-previous-button-aria-label.

If any of these attributes are provided by the developer, amp-carousel should use their values instead of the default strings when building the next/previous buttons in the base-carousel.js file.

Step by step

Once approved, your changes will be merged. ⚡⚡⚡Congrats on making your first contribution to the AMP Project!⚡⚡⚡ You'll be able to see it live across the web soon!

Thanks, and we hope to see more contributions from you soon.

Questions?

If you have questions ask in this issue or on your Pull Request (mentioning @aghassemi) or see the How to get help section of the Getting Started guide.

erwinmombay avatar Oct 05 '15 02:10 erwinmombay

Is this still needed?

adelinamart avatar Feb 03 '17 22:02 adelinamart

@adelinamart yes, but should be part of i18n work. not sure who owns that

erwinmombay avatar Feb 06 '17 18:02 erwinmombay

Updated the feature to be a GFI.

aghassemi avatar Apr 28 '17 20:04 aghassemi

I would like to claim this.

alannawalton avatar May 18 '17 21:05 alannawalton