Skip to content
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

Scheduler a11y: fix Overview demo contrast issues #28200

Open
wants to merge 4 commits into
base: 24_2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 42 additions & 11 deletions apps/demos/Demos/Scheduler/Overview/Angular/app/app.component.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
::ng-deep .dx-scheduler-group-header-content,
::ng-deep .dx-scheduler-date-table-cell {
position: relative;
}

::ng-deep .dx-scheduler-date-table-other-month.dx-scheduler-date-table-cell {
opacity: 1;
color: rgba(0, 0, 0, 0.3) !important;
Expand Down Expand Up @@ -27,11 +32,6 @@
color: rgba(255, 255, 255, 1);
}

::ng-deep .dx-scheduler-group-header-content,
::ng-deep .dx-scheduler-date-table-cell {
position: relative;
}

::ng-deep .dx-scheduler-date-table-cell .dx-template-wrapper {
position: absolute;
height: 100%;
Expand All @@ -40,11 +40,32 @@
}

::ng-deep .avatar {
width: 155px;
width: 124px;
float: left;
overflow: hidden;
position: relative;
height: 125px;
height: 124px;
border: 1px solid rgba(0, 0, 0, 0.24);
border-radius: 50%;
background-color: rgba(255, 255, 255, 1);
}

::ng-deep .avatar[title="John Heart"] img {
position: relative;
width: 126px;
height: 130px;
object-fit: contain;
top: 5px;
left: 3px;
}

::ng-deep .avatar[title="Sandra Johnson"] img {
position: relative;
width: 126px;
height: 130px;
object-fit: contain;
top: 5px;
left: 3px;
}

::ng-deep .name {
Expand All @@ -69,28 +90,38 @@
font-size: 11pt;
font-weight: normal;
padding: 25px 20px;
color: #707070;
}

::ng-deep .dx-color-scheme-contrast .info {
color: #fff;
}

::ng-deep .day-cell {
width: 100%;
height: 100%;
background-position: center center;
background-repeat: no-repeat;
}

::ng-deep .dx-scheduler-appointment {
color: rgba(255, 255, 255, 1);
}

::ng-deep .employee-1 {
background-color: rgba(86, 202, 133, 0.1);
background-color: rgba(55, 126, 58, 0.08);
}

::ng-deep .employee-2 {
background-color: rgba(255, 151, 71, 0.1);
background-color: rgba(194, 81, 0, 0.08);
}

::ng-deep .employee-weekend-1 {
background-color: rgba(86, 202, 133, 0.2);
background-color: rgba(55, 126, 58, 0.12);
}

::ng-deep .employee-weekend-2 {
background-color: rgba(255, 151, 71, 0.2);
background-color: rgba(194, 81, 0, 0.12);
}

::ng-deep .training-background-0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div class="name" [style.background]="employee.color">
<h2>{{ employee.text }}</h2>
</div>
<div class="avatar">
<div class="avatar" title="{{ employee.text }}">
<img [src]="employee.data.avatar" alt="{{ employee.text }} photo" />
</div>
<div class="info" [style.color]="employee.color">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ export class Data {
const employees: Employee[] = [{
text: 'John Heart',
id: 1,
color: '#56ca85',
avatar: '../../../../images/gym/coach-man.png',
color: 'rgba(50, 134, 56, 1)',
avatar: '../../../../images/employees/19.png',
age: 27,
discipline: 'ABS, Fitball, StepFit',
}, {
text: 'Sandra Johnson',
id: 2,
color: '#ff9747',
avatar: '../../../../images/gym/coach-woman.png',
color: 'rgba(194, 81, 0, 1)',
avatar: '../../../../images/employees/31.png',
age: 25,
discipline: 'ABS, Fitball, StepFit',
}];
Expand Down
2 changes: 1 addition & 1 deletion apps/demos/Demos/Scheduler/Overview/React/ResourceCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ResourceCell = (props: ResourceCellProps) => {
<div className="name" style={{ background: color }}>
<h2>{text}</h2>
</div>
<div className="avatar">
<div className="avatar" title={text}>
<img
src={avatar}
alt={`${text} photo`}
Expand Down
8 changes: 4 additions & 4 deletions apps/demos/Demos/Scheduler/Overview/React/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ export const data: Appointment[] = [
export const employees: Resource[] = [{
text: 'John Heart',
id: 1,
color: '#56ca85',
avatar: '../../../../images/gym/coach-man.png',
color: 'rgba(50, 134, 56, 1)',
avatar: '../../../../images/employees/19.png',
age: 27,
discipline: 'ABS, Fitball, StepFit',
}, {
text: 'Sandra Johnson',
id: 2,
color: '#ff9747',
avatar: '../../../../images/gym/coach-woman.png',
color: 'rgba(194, 81, 0, 1)',
avatar: '../../../../images/employees/31.png',
age: 25,
discipline: 'ABS, Fitball, StepFit',
}];
49 changes: 38 additions & 11 deletions apps/demos/Demos/Scheduler/Overview/React/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.dx-scheduler-group-header,
.dx-scheduler-date-table-cell {
position: relative;
}

.dx-scheduler-date-table-other-month.dx-scheduler-date-table-cell {
opacity: 1;
color: rgba(0, 0, 0, 0.3) !important;
Expand Down Expand Up @@ -27,11 +32,6 @@
color: rgba(255, 255, 255, 1);
}

.dx-template-wrapper,
.dx-scheduler-date-table-cell {
position: relative;
}

.dx-scheduler-date-table-cell .dx-template-wrapper {
position: absolute;
height: 100%;
Expand All @@ -40,11 +40,32 @@
}

.avatar {
width: 155px;
width: 124px;
float: left;
overflow: hidden;
position: relative;
height: 125px;
height: 124px;
border: 1px solid rgba(0, 0, 0, 0.24);
border-radius: 50%;
background-color: rgba(255, 255, 255, 1);
}

.avatar[title="John Heart"] img {
position: relative;
width: 126px;
height: 130px;
object-fit: contain;
top: 5px;
left: 3px;
}

.avatar[title="Sandra Johnson"] img {
position: relative;
width: 126px;
height: 130px;
object-fit: contain;
top: 5px;
left: 3px;
}

.name {
Expand Down Expand Up @@ -77,25 +98,30 @@
}

.day-cell {
width: 100%;
height: 100%;
background-position: center center;
background-repeat: no-repeat;
}

.dx-scheduler-appointment {
color: rgba(255, 255, 255, 1);
}

.employee-1 {
background-color: rgba(86, 202, 133, 0.1);
background-color: rgba(55, 126, 58, 0.08);
}

.employee-2 {
background-color: rgba(255, 151, 71, 0.1);
background-color: rgba(194, 81, 0, 0.08);
}

.employee-weekend-1 {
background-color: rgba(86, 202, 133, 0.2);
background-color: rgba(55, 126, 58, 0.12);
}

.employee-weekend-2 {
background-color: rgba(255, 151, 71, 0.2);
background-color: rgba(194, 81, 0, 0.12);
}

.training-background-0 {
Expand All @@ -109,3 +135,4 @@
.training-background-2 {
background-image: url("../../../../images/gym/icon-fitball.png");
}

5 changes: 4 additions & 1 deletion apps/demos/Demos/Scheduler/Overview/ReactJs/ResourceCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const ResourceCell = (props) => {
>
<h2>{text}</h2>
</div>
<div className="avatar">
<div
className="avatar"
title={text}
>
<img
src={avatar}
alt={`${text} photo`}
Expand Down
8 changes: 4 additions & 4 deletions apps/demos/Demos/Scheduler/Overview/ReactJs/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ export const employees = [
{
text: 'John Heart',
id: 1,
color: '#56ca85',
avatar: '../../../../images/gym/coach-man.png',
color: 'rgba(50, 134, 56, 1)',
avatar: '../../../../images/employees/19.png',
age: 27,
discipline: 'ABS, Fitball, StepFit',
},
{
text: 'Sandra Johnson',
id: 2,
color: '#ff9747',
avatar: '../../../../images/gym/coach-woman.png',
color: 'rgba(194, 81, 0, 1)',
avatar: '../../../../images/employees/31.png',
age: 25,
discipline: 'ABS, Fitball, StepFit',
},
Expand Down
49 changes: 38 additions & 11 deletions apps/demos/Demos/Scheduler/Overview/ReactJs/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.dx-scheduler-group-header,
.dx-scheduler-date-table-cell {
position: relative;
}

.dx-scheduler-date-table-other-month.dx-scheduler-date-table-cell {
opacity: 1;
color: rgba(0, 0, 0, 0.3) !important;
Expand Down Expand Up @@ -27,11 +32,6 @@
color: rgba(255, 255, 255, 1);
}

.dx-template-wrapper,
.dx-scheduler-date-table-cell {
position: relative;
}

.dx-scheduler-date-table-cell .dx-template-wrapper {
position: absolute;
height: 100%;
Expand All @@ -40,11 +40,32 @@
}

.avatar {
width: 155px;
width: 124px;
float: left;
overflow: hidden;
position: relative;
height: 125px;
height: 124px;
border: 1px solid rgba(0, 0, 0, 0.24);
border-radius: 50%;
background-color: rgba(255, 255, 255, 1);
}

.avatar[title="John Heart"] img {
position: relative;
width: 126px;
height: 130px;
object-fit: contain;
top: 5px;
left: 3px;
}

.avatar[title="Sandra Johnson"] img {
position: relative;
width: 126px;
height: 130px;
object-fit: contain;
top: 5px;
left: 3px;
}

.name {
Expand Down Expand Up @@ -77,25 +98,30 @@
}

.day-cell {
width: 100%;
height: 100%;
background-position: center center;
background-repeat: no-repeat;
}

.dx-scheduler-appointment {
color: rgba(255, 255, 255, 1);
}

.employee-1 {
background-color: rgba(86, 202, 133, 0.1);
background-color: rgba(55, 126, 58, 0.08);
}

.employee-2 {
background-color: rgba(255, 151, 71, 0.1);
background-color: rgba(194, 81, 0, 0.08);
}

.employee-weekend-1 {
background-color: rgba(86, 202, 133, 0.2);
background-color: rgba(55, 126, 58, 0.12);
}

.employee-weekend-2 {
background-color: rgba(255, 151, 71, 0.2);
background-color: rgba(194, 81, 0, 0.12);
}

.training-background-0 {
Expand All @@ -109,3 +135,4 @@
.training-background-2 {
background-image: url("../../../../images/gym/icon-fitball.png");
}

6 changes: 5 additions & 1 deletion apps/demos/Demos/Scheduler/Overview/Vue/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ const dataSource = data;

.dx-scheduler-date-table-cell .dx-template-wrapper {
position: absolute;
width: 100%;
height: 100%;
width: 100%;
padding-right: 6px;
}

.dx-scheduler-appointment {
color: rgba(255, 255, 255, 1);
}

</style>
Loading
Loading