File tree Expand file tree Collapse file tree 4 files changed +36
-48
lines changed
Expand file tree Collapse file tree 4 files changed +36
-48
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33 < head >
44 < meta charset ="UTF-8 " />
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6- < title > Vite + React</ title >
6+ < title > Color contrast</ title >
7+ < link href ="./style.css " rel ="stylesheet " />
78 </ head >
8- < body >
9- < div id ="root "> </ div >
10- < script type ="module " src ="/src/main.jsx "> </ script >
9+ < body class ="">
10+ < div class ="container " id ="container ">
11+ < div class ="box box--white "> text content</ div >
12+ < div class ="box box--yellow "> text content</ div >
13+ < div class ="box box--orange "> text content</ div >
14+ < div class ="box box--transparent "> </ div >
15+ < div class ="box box--green ">
16+ < span class ="tamil "> tamil </ span >
17+ text content
18+ </ div >
19+ < div class ="box box--dummy ">
20+ < span class ="tamil "> tamil </ span >
21+ text content
22+ </ div >
23+ </ div >
24+ <!-- <script src="../node_modules/color-contrast-checker/dist/color-contrast-checker.umd.js"></script> -->
25+ < script src ="./dist/iife/colorContrast.js "> </ script >
26+ < script >
27+ try {
28+ const container = document . querySelector ( "#container" ) ;
29+ const getChecker = new colorContrast . ColorContrastChecker ( container ) ;
30+ getChecker . init ( ) ;
31+
32+ setTimeout ( ( ) => {
33+ const divElement = document . createElement ( "div" ) ;
34+ divElement . classList . add ( "box" , "box--red" ) ;
35+ divElement . textContent = "dummy element" ;
36+ container . appendChild ( divElement ) ;
37+ } , 10000 ) ;
38+ } catch ( error ) {
39+ console . error ( "Error initializing ColorContrastChecker:" , error . message ) ;
40+ }
41+ </ script >
1142 </ body >
1243</ html >
Original file line number Diff line number Diff line change 11{
22 "name" : " a11y-color-contrast-checker" ,
3- "version" : " 1.0.14 " ,
3+ "version" : " 1.0.15 " ,
44 "description" : " Plugin for check the color contrast of an element" ,
55 "main" : " dist/es5/colorContrast.js" ,
66 "module" : " dist/es6/colorContrast.js" ,
File renamed without changes.
You can’t perform that action at this time.
0 commit comments