Skip to content

Commit ea3bc0b

Browse files
committed
Merge branch 'master' of github.com:IBM/carbon-components-angular into a11y
2 parents 9c0491d + 7da7587 commit ea3bc0b

20 files changed

+293
-62
lines changed

src/accordion/accordion-item.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export class AccordionItem {
3636

3737
@HostBinding("class.bx--accordion__item") itemClass = true;
3838
@HostBinding("class.bx--accordion__item--active") @Input() expanded = false;
39-
@HostBinding("style.display") @HostBinding("attr.role") itemType = "list-item";
39+
@HostBinding("style.display") itemType = "list-item";
40+
@HostBinding("attr.role") role = "heading";
41+
@HostBinding("attr.aria-level") @Input() ariaLevel = 3;
4042

4143
constructor() {
4244
AccordionItem.accordionItemCount++;

src/checkbox/checkbox.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class CheckboxChange {
6767
[indeterminate]="indeterminate"
6868
[attr.aria-label]="ariaLabel"
6969
[attr.aria-labelledby]="ariaLabelledby"
70-
[attr.aria-checked]="indeterminate ? 'mixed' : checked"
70+
[attr.aria-checked]="(indeterminate ? 'mixed' : checked)"
7171
(change)="onChange($event)"
7272
(click)="onClick($event)">
7373
<label [for]="id" class="bx--checkbox-label">

src/dialog/overflow-menu/overflow-menu.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import { Component, ElementRef } from "@angular/core";
55
*
66
* html:
77
* ```
8-
* <ibm-overflow-menu [options]="overflowContent"></ibm-overflow-menu>
9-
* <ng-template #overflowContent>
8+
* <ibm-overflow-menu>
109
* <ibm-overflow-menu-option>Option 1</ibm-overflow-menu-option>
1110
* <ibm-overflow-menu-option>Option 2</ibm-overflow-menu-option>
12-
* </ng-template>
11+
* </ibm-overflow-menu>
1312
* ```
1413
*/
1514
@Component({

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ export * from "./radio/radio.module";
2121
export * from "./input/input.module";
2222
export * from "./select/select.module";
2323
export * from "./tiles/tiles.module";
24+
export * from "./progress-indicator/progress-indicator.module";

src/input/input.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Directive, HostBinding } from "@angular/core";
55
*
66
* Example:
77
*
8-
* ```hmtl
8+
* ```html
99
* <input ibmText/>
1010
* ```
1111
*

src/input/input.module.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ import { CommonModule } from "@angular/common";
66
// imports
77
import { LabelComponent } from "./label.component";
88
import { TextInput } from "./input.directive";
9+
import { TextArea } from "./text-area.directive";
910

1011
@NgModule({
1112
declarations: [
1213
LabelComponent,
13-
TextInput
14+
TextInput,
15+
TextArea
1416
],
1517
exports: [
1618
LabelComponent,
17-
TextInput
19+
TextInput,
20+
TextArea
1821
],
1922
imports: [
2023
CommonModule,

src/input/input.stories.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ storiesOf("Input", module).addDecorator(
2222
template: `
2323
<input ibmText placeholder="Optional placeholder text"/>
2424
`
25+
})).add("TextArea", () => ({
26+
template: `
27+
<textarea ibmTextArea placeholder="Optional placeholder text" rows="4" cols="50"></textarea>
28+
`
2529
}));

src/input/text-area.directive.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Directive, HostBinding } from "@angular/core";
2+
3+
/**
4+
* A directive for applying styling to a textarea element.
5+
*
6+
* Example:
7+
*
8+
* ```html
9+
* <textarea ibmTextArea></textarea>
10+
* ```
11+
*
12+
* See the [vanilla carbon docs](http://www.carbondesignsystem.com/components/text-input/code) for more detail.
13+
*/
14+
@Directive({
15+
selector: "[ibmTextArea]"
16+
})
17+
export class TextArea {
18+
@HostBinding("class.bx--text-area") baseClass = true;
19+
}

src/modal/alert-modal.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import Modal from "./modal.decorator";
5858
@Component({
5959
selector: "ibm-alert-modal",
6060
template: `
61-
<ibm-modal [modalType]="modalType">
61+
<ibm-modal [modalType]="modalType" [modalLabel]="modalTitle">
6262
<ibm-modal-header (closeSelect)="closeModal()">
6363
<p class="bx--modal-header__label bx--type-delta">{{modalLabel}}</p>
6464
<p class="bx--modal-header__heading bx--type-beta">{{modalTitle}}</p>

src/modal/modal-footer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Component } from "@angular/core";
88
@Component({
99
selector: "ibm-modal-footer",
1010
template: `
11-
<footer role="contentinfo" class="bx--modal-footer">
11+
<footer class="bx--modal-footer">
1212
<ng-content></ng-content>
1313
</footer>
1414
`

0 commit comments

Comments
 (0)