ç®æ¬¡
ç®æ¬¡
ã¯ããã«
Customizable Select Element Ep.8ã§ã¯ã<selectmenu>
ãçµãŠã<selectlist>
ãã<select>
ã«è³ããŸã§ã®çµç·¯ãã話ãããŸããã
端çã«ãŸãšãããšãåæExplainerã§äœ¿çšãããŠãã<selectmenu>
ã¯ãäž»ã«UIãã¿ãŒã³ã®èŠ³ç¹ããæ··ä¹±ãæãããšãæžå¿µãããOpen UIå
ã§ã®è°è«ã以ã£ãŠ<selectlist>
ã«å€æŽãããŸããã
ãã®åŸã<selectlist>
ã®å®è£
ã®æ¹éãProgressive Enhancementã®èŠ³ç¹ããã<select>
ã®æ©èœãæ¡åŒµãã圢ã§å®è£
ããæ¹ãè¯ãã®ã§ã¯ãªãããšããè°è«ãè¡ããã2024/9æã«<select>
ãšããŠRFCãçºè¡šãããã«è³ããŸãã
Customizable Select Elementã®é¢é£ä»æ§
åããŒãã®å®çŸ©
CSEã®åããŒãã¯ãRFCãåºãããæç¹ãã倧ããå€åããŠããŸãã ïŒ2024/12/9çŸåšïŒ
2024/12/9æç¹ã§ã®selectã®åããŒãã®å®çŸ©
<button>
: éžæè¢ã®ããããªãŒããŒãééãããã¿ã³èŠçŽ::picker-icon
: ãã¿ã³èŠçŽ å³ã®ç¢å°ã¢ã€ã³ã³<selectedcontent>
: éžæãããŠããOptionã®å éšHTMLã®ã¯ããŒã³ãäœæããèŠçŽ::picker(select)
:<select>
å ã®<button>
以å€ã®èŠçŽ ãå«ãããããªãŒããŒéšå<option>
: éžæè¢ã®èŠçŽoption::checkmark
: éžæãããŠããOptionã瀺ããã§ãã¯ããŒã¯éšå<option>:checked
: éžæãããŠããOptionã瀺ãæ¬äŒŒã¯ã©ã¹
appearance: base-select;
<select>
ãCSEã«Opt-inããã«ã¯ãCSSappearance
ããããã£ã䜿çšããŸãã以äžã®ããã«ã<select>
ãš::picker(select)
ã«appearance: base-select;
ãæå®ããããšã§ã<select>
ãCSEã«ã¢ããã°ã¬ãŒãããããšãã§ããŸãã
äžèšã®HTMLãšCSSã§ãCSEãOpt-inããã<select>
ãCSEããã©ã«ãã®ã¹ã¿ã€ã«ã«ãªããŸãã
CSEããã©ã«ãã®ã¹ã¿ã€ã«
ããã§æ°ã«ãªãã®ãããäœã以ãŠãã®ããã©ã«ãã®ã¹ã¿ã€ã«ã«ãªã£ãã®ããã§ãã
éžæããã<option>
ã®ãã§ãã¯ããŒã¯
CSEããã©ã«ãã®ã¹ã¿ã€ã«ã§ã¯ãéžæããã<option>
ã«ãã§ãã¯ããŒã¯ãã€ããŠããŸãããã§ãã¯ããŒã¯ã¯ãCSEã§ãªããŠãïŒappearance: base-select;
ãèšå®ããªã<select>
ã§ãïŒã€ããŠããŸãããCSEã®ããã©ã«ãã¹ã¿ã€ã«ã決ãã段éã§ã¯ãããã§ãã¯ããŒã¯ãå¿
èŠãããã©ããã£ãå®è£
ã«ããã¹ããããšããè°è«ãè¡ãããŸããã
- selectlist: Should the "checked" option have a checkmark next to it? · Issue #863 · openui/open-ui
ãŸããããã§ãã¯ããŒã¯ãå¿ èŠããã«é¢ããŠã§ãã
ãã§ãã¯ããŒã¯ãæäŸããªãããšã«ãªã£ãå Žåãã³ã³ãã©ã¹ãæ¯ã®èŠ³ç¹ããã¢ã¯ã»ã·ããªãã£ã®åé¡ãçããå¯èœæ§ããããšã®ææããããŸããã
ãã§ãã¯ããŒã¯ããªããéžæè¢ããããªãŒããŒã®èæ¯è²ãšããããªãŒããŒå éšã®èæ¯è²ã®ã³ã³ãã©ã¹ãæ¯ãäœãå ŽåãéžæãããèŠçŽ ãæ瀺ããããã«éåžžã«åŒ·ãè²ã®èæ¯è²ãã€ãããªã©ã®å¯Ÿçãå¿ èŠã«ãªããŸãããããªã£ãå Žåããã©ãŒã«ã¹ã€ã³ãžã±ãŒã¿ãšã®ã³ã³ãã©ã¹ãæ¯ãäœããªãå¯èœæ§ãåºãŠããŸãã
ã€ãŸããããã§ãã¯ããŒã¯ãæäŸããªãããšããéžæè¢ããšã£ãå Žåããéžæè¢ããããªãŒããŒã®èæ¯è² vs ããããªãŒããŒå éšã®èæ¯è² vs ãã©ãŒã«ã¹ã€ã³ãžã±ãŒã¿ã®ããŒããŒè²ããšãã3ã€ã®è²ã®ã³ã³ãã©ã¹ãæ¯ã®ãã©ã³ã¹ãèæ ®ããå¿ èŠããããšããããšã«ãªããŸãã ãã®ç¹ããã§ãã¯ããŒã¯ãæäŸãããšãéžæãããèŠçŽ ãæ瀺ããããšãã§ãããããéžæè¢ããããªãŒããŒã®èæ¯è²ãšããããªãŒããŒå éšã®èæ¯è²ã®ã³ã³ãã©ã¹ãæ¯ãæ°ã«ããå¿ èŠããªããªãã幟åãã³ã³ãã©ã¹ãæ¯ã®èæ ®ãç·©åããããšããããšã§ãã
å ããŠãåäžéžæ<select>
ã®æç¹ã§ããã§ãã¯ããŒã¯ãèæ
®ããŠãããšããã§ãã¯ããŒã¯ã®æäŸãå¿
ãå¿
èŠã«ãªã£ãŠããè€æ°éžæ<select>
ã®å®è£
ã«ãããŠã圹ç«ã€ãšããçç±ããããŸããã
次ã«ããã©ããã£ãå®è£ ã«ããã¹ãããã«é¢ããŠè¿œã£ãŠãããŸãã ãã§ãã¯ããŒã¯ãã©ã®ããã«UAã¹ã¿ã€ã«ã·ãŒãã«å®è£ ãããã«é¢ããŠãIssueã®æç¹ã§ã¯ä»¥äžã®ããã«å®è£ ãããããšãæãŸãããšãããŸããã
ãã§ãã¯ããŒã¯ãæ¬äŒŒèŠçŽ ã§å®è£ ãããŠããã®ã¯ãDOMã«ãã§ãã¯ããŒã¯ãå®è£ ããã®ã§ã¯ãªããCSSæ¬äŒŒèŠçŽ ã§å®è£ ããããšã§ããŠãŒã¶ãããç°¡åã«äžæžããåé€ããïŒã«ã¹ã¿ãã€ãºããïŒããšãå¯èœã ããã§ãã
æ¬äŒŒèŠçŽ ãšèšã£ãŠãã::before
ã::after
ã¯æŽãªãã¹ã¿ã€ãªã³ã°ãæœãããã«çšããããšããã±ãŒã¹ãèãããããããæ°ããæ¬äŒŒèŠçŽ ãå®çŸ©ãããããšã«ãªããŸããã
RESOLVED: create new pseudo elements for checkmark and dropdown icon for base appearance select instead of using ::before and ::after in the UA stylesheet https://github.com/w3c/csswg-drafts/issues/10908#issuecomment-2371836734
ãã®äžã§ã次ã«æ³šç®ãã¹ãç¹ã¯ãæ¬äŒŒèŠçŽ ã®content
ã'\2713' / ''
ãšãªã£ãŠããããšã§ãã
çè
ã¯ç¥ããªãã£ãã®ã§ãããcontent
ããããã£ã¯ã¹ã©ãã·ã¥ïŒ/
ïŒåºåãã§altããã¹ããæå®ããããšãã§ãããããæ瀺ããŠããå Žåã¯ãcontent
ããããã£ã®ååã衚瀺ãããåŸåã¯altããã¹ããšããŠATã«èªã¿äžããããããã§ããïŒãã©ãŠã¶ã«ãã£ãŠaltããã¹ãã¯è¡šç€ºããããããã§ãããæªç¢ºèªã§ãïŒ
äžèšã®å®è£
ã«ãããATã¯content
ããããã£ã«ããèªã¿äžãããããéžæããã<option>
ã®checkedå±æ§ã«ããèªã¿äžãã®ã¿ããŠãããã®ã§ãéè€ããèªã¿äžããèµ·ãããŸããã
å ããŠãçµµæåã®ãâïžããªã©ã䜿çšããã®ã§ã¯ãªããæšæºåãããUnicodeã§ãã§ãã¯ããŒã¯ãè¡šçŸããããšã«ãããOSã®æ £ç¿ã«è¿œåŸãããäžè²«æ§ã®ãã衚瀺ãå®çŸã§ããŸãã
RESOLVED: support checkmark next to checked option, implemented via the content property on the ::marker pseudo element. The UA should set a Unicode character by default, which isn't read out by screen reader. https://github.com/openui/open-ui/issues/863#issuecomment-2127775634
äžèšã®è°è«æç¹ã§ã¯::marker
ã§ããããäžæŠChromiumã«ã¯ä»ãçŒãåçã«::before
ã§å®è£
ãããRFCå
¬éæç¹ã§ã¯ãã®ãŸãŸ::before
ã§ã2024/12çŸåšã§ã¯::checkmark
ã«å€ãããäžèšã®UAã¹ã¿ã€ã«ã·ãŒããå®è£
ãããŠããŸãã
RESOLVED: Name the pseudo-element ::checkmark https://github.com/w3c/csswg-drafts/issues/10908#issuecomment-2489173316
chrome canaryã§::checkmark
ã®UAã¹ã¿ã€ã«
CSEã®ããã©ã«ãã¹ã¿ã€ã«ã«é¢ããŠã¯ã以äžã®Issueã§çŸåšé²è¡åœ¢ã§æŽæ°ãéããããŠãããChromiumã§ã¯ãã®Issueã®å€æŽã«è¿œåŸãã圢ã§å®è£ ãé²ããããŠããããã§ããã
Issueã«ãããšäž»ã«ä»¥äžã®é ç®ã«çç®ã§ãããã§ãä»åã¯ãã®äžéšã§ãããã§ãã¯ããŒã¯ã«é¢ããŠåãäžããŸããã
-
appearance: base-select;
ã®èŠãç®ã¯ãã©ã®ããã«ããŠæ±ºãŸã£ãã®ã- éžæããã
<option>
ã®ããã©ã«ããã§ãã¯ããŒã¯ - ããããªãŒããŒãééãããã¿ã³èŠçŽ å³ã®ç¢å°ã¢ã€ã³ã³
- ãã¿ã³èŠçŽ ãéžæè¢ããããªãŒããŒã®è²
- ãã®ä»ã®ã¹ã¿ã€ã«
- éžæããã
äžèšIssueã«èšãããŠããããã©ã«ãã¹ã¿ã€ã«ã«ãªã£ãèæ¯ã«ã€ããŠã次åãããåŒãç¶ãèŠãŠããããšæããŸãã
ããã§ã¯ããŸãææ¥â
See you tomorrow!