Skip to content

Commit cf67b6f

Browse files
committed
don't add heading anchors to notes
1 parent 9f42b07 commit cf67b6f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

assets-src/js/main/flashes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ const flashes = (function () {
2727
}
2828

2929
html += '<div class="l-box note note--' + type + '" role="' + (type === 'error' ? 'alert' : 'status')
30-
+ '" aria-labelledby="' + type + '-summary-title" tabindex="-1" data-component = "' + type + '-summary" >';
30+
+ '" aria-labelledby="' + type + '-summary-title" tabindex="-1" ' +
31+
'data-component = "' + type + '-summary" data-anchor="no">';
3132
html += '<h2 id="' + type + '-summary-title" class="txt-saturn">' + flashes['title-' + type] + '</h2>';
3233
html += '<ul class="clean-list" role="list">';
3334
for (let i in flashes[type]) {

public/dist/assets/js/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ const flashes = function () {
887887
if (type.startsWith('title-') || type === 'length' || !flashes.hasOwnProperty(type)) {
888888
continue;
889889
}
890-
html += '<div class="l-box note note--' + type + '" role="' + (type === 'error' ? 'alert' : 'status') + '" aria-labelledby="' + type + '-summary-title" tabindex="-1" data-component = "' + type + '-summary" >';
890+
html += '<div class="l-box note note--' + type + '" role="' + (type === 'error' ? 'alert' : 'status') + '" aria-labelledby="' + type + '-summary-title" tabindex="-1" ' + 'data-component = "' + type + '-summary" data-anchor="no">';
891891
html += '<h2 id="' + type + '-summary-title" class="txt-saturn">' + flashes['title-' + type] + '</h2>';
892892
html += '<ul class="clean-list" role="list">';
893893
for (let i in flashes[type]) {
@@ -977,7 +977,6 @@ let headingAnchors = function () {
977977
anchor.setAttribute('href', '#' + anchorHref);
978978
anchor.setAttribute('class', 'heading-anchor');
979979
anchor.innerHTML = '<span aria-hidden="true">&sect;</span>' + '<span class="visuallyhidden">' + _translations__WEBPACK_IMPORTED_MODULE_0__.translate.translate('anchor', languageCode) + '</span>';
980-
console.log(heading.textContent);
981980
heading.append('\xa0');
982981
heading.appendChild(anchor);
983982
});

0 commit comments

Comments
 (0)