Skip to content

Commit a2c1f12

Browse files
authored
Rename #main to #app-main. (#870)
Resolves: rdar://110847532
1 parent 8978f95 commit a2c1f12

File tree

9 files changed

+13
-11
lines changed

9 files changed

+13
-11
lines changed

src/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
:class="{ fromkeyboard: fromKeyboard, hascustomheader: hasCustomHeader }"
1515
>
1616
<div :id="AppTopID" />
17-
<a href="#main" id="skip-nav" v-if="!isTargetIDE">{{ $t('accessibility.skip-navigation') }}</a>
17+
<a href="#app-main" id="skip-nav" v-if="!isTargetIDE">
18+
{{ $t('accessibility.skip-navigation') }}
19+
</a>
1820
<slot name="header" :isTargetIDE="isTargetIDE">
1921
<SuggestLang v-if="enablei18n" />
2022
<!-- Render the custom header by default, if there is no content in the `header` slot -->

src/components/Article.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
:rootReference="hierarchy.reference"
1919
:identifierUrl="identifierUrl"
2020
/>
21-
<main id="main" tabindex="0">
21+
<main id="app-main" tabindex="0">
2222
<slot name="above-hero" />
2323
<component
2424
v-for="(section, index) in sections"

src/components/DocumentationTopic.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
>
1616
<component
1717
:is="isTargetIDE ? 'div' : 'main'"
18-
class="main" id="main"
18+
class="main" id="app-main"
1919
>
2020
<DocumentationHero
2121
:role="role"
@@ -778,7 +778,7 @@ $space-size: 15px;
778778
}
779779
}
780780
781-
#main {
781+
#app-main {
782782
outline-style: none;
783783
height: 100%;
784784

src/components/Tutorial.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
:rootReference="hierarchy.reference"
1919
:identifierUrl="identifierUrl"
2020
/>
21-
<main id="main" tabindex="0">
21+
<main id="app-main" tabindex="0">
2222
<Section
2323
v-for="(section, index) in sections"
2424
:section="section"

src/components/TutorialsOverview.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
>
1818
{{ title }}
1919
</Nav>
20-
<main id="main" tabindex="0" class="main">
20+
<main id="app-main" tabindex="0" class="main">
2121
<div class="radial-gradient">
2222
<slot name="above-hero" />
2323
<Hero

src/styles/_base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// import the current theme _base file. This file imports fonts and other global styles
2222
@import "~theme/styles/_theme_base.scss";
2323

24-
#main {
24+
#app-main {
2525
outline-style: none;
2626
}
2727

src/styles/base/_reset.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ button {
162162
@media print {
163163

164164
body,
165-
#main,
165+
#app-main,
166166
#content {
167167
color: #000;
168168
}

tests/unit/App.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ describe('App', () => {
117117
const wrapper = createWrapper();
118118
const skipNavigation = wrapper.find('#skip-nav');
119119
expect(skipNavigation.text()).toBe('accessibility.skip-navigation');
120-
expect(skipNavigation.attributes('href')).toBe('#main');
120+
expect(skipNavigation.attributes('href')).toBe('#app-main');
121121
});
122122

123123
it('exposes a header slot', () => {

tests/unit/components/DocumentationTopic.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ describe('DocumentationTopic', () => {
278278
const main = wrapper.find('main');
279279
expect(main.exists()).toBe(true);
280280
expect(main.classes('main')).toBe(true);
281-
expect(main.attributes('id')).toBe('main');
281+
expect(main.attributes('id')).toBe('app-main');
282282
});
283283

284284
it('renders a <div> instead of <main> in IDE mode', () => {
@@ -293,7 +293,7 @@ describe('DocumentationTopic', () => {
293293
expect(wrapper.find('main').exists()).toBe(false);
294294
const div = wrapper.find('.main');
295295
expect(div.exists()).toBe(true);
296-
expect(div.attributes('id')).toBe('main');
296+
expect(div.attributes('id')).toBe('app-main');
297297
});
298298

299299
it('renders an aria live that tells VO users which it is the current page content', () => {

0 commit comments

Comments
 (0)