Skip to content

Fix redundant title in Map Feedback attribution #11360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 23, 2021

Conversation

avpeery
Copy link
Contributor

@avpeery avpeery commented Dec 23, 2021

Closes #11324. PR #11064 removed adding a title attribute to Map Feedback (which was overwriting the previous title attribute "improve this map" that comes from the vector tile source). This quick fix removes the title attribute for Map Feedback as aria-label is being used instead.

Launch Checklist

  • briefly describe the changes in this PR
  • manually test the debug page
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: Removes redundant title attribute from Improve this Map attribution element

Sorry, something went wrong.

@avpeery avpeery added bug 🐞 skip changelog Used for PRs that do not need a changelog entry labels Dec 23, 2021
@avpeery avpeery requested a review from mourner December 23, 2021 22:10
@avpeery avpeery removed the skip changelog Used for PRs that do not need a changelog entry label Dec 23, 2021
@@ -98,6 +98,7 @@ class AttributionControl {
_setElementTitle(element: HTMLElement, title: string) {
const str = this._map._getUIString(`AttributionControl.${title}`);
element.setAttribute('aria-label', str);
if (element.hasAttribute('title')) element.removeAttribute('title');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the if statement isn't strictly necessary

@avpeery avpeery merged commit 9f7ab71 into main Dec 23, 2021
@avpeery avpeery deleted the avpeery/fix-redundant-title-in-attribution branch December 23, 2021 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redundant title text on "Improve this map" link
2 participants