2021. 8. 26. 11:31ㆍ퍼블리싱/CSS
IR( image replacement )
대체 텍스트 for 웹접근성.
img 태그 내의 alt 속성과 같다.
하지만 백그라운드이미지로 넣는 경우에는 대체텍스트가 필요.
text-indent:-9999px 등 여러가지 방법이 있으나 최신 방법은 아래와 같다.
(H5BP-html5 boilerplate, 부트스트랩에서 사용중)
.sr-only {
position: absolute; /* position: absolute/fixed 에서만 clip 속성 작동 */
margin: -1px; /* 부트스트랩에선 안씀 */
width: 1px;
height: 1px;
padding: 0;
border: 0;
white-space: nowrap;
overflow: hidden; /* overflow: visible 이면 clip 속성 작동 안됨 */
clip: rect(0, 0, 0, 0);
clip-path: inset(50%); /* H5BP에선 안씀 */
}
IS ( image spriting )
로딩 속도를 줄이고 간편하게 관리하기 위한 방법.
여러 이미지를 모아 하나의 파일로 만들고 bg-position 등으로 조정.
https://gia-world.github.io/project3/#snsWrap
( sns 이미지 부분 )
참고자료
https://haneunbi.github.io/2020/06/01/css-ir/
[CSS] IR(Image Replacement) 기법
스크린 리더 사용자를 위한 대체 텍스트 제공하기
haneunbi.github.io
https://m.blog.naver.com/eirene100999/221686480420
경력 > 2. 웹퍼블리셔 :: [초급] IR기법과 IS기법의 정의와 예제를 작성하라
1)
1-1.
태그의 속성 title vs alt 차이점 * title : 이미지의 설명이다 * alt :...
blog.naver.com
https://cloudfour.com/thinks/see-no-evil-hidden-content-and-accessibility/
See No Evil: Hidden Content and Accessibility
When I first started learning web development I thought hiding content was simple: slap display: none; onto your hidden element and call it a day. Since then I've learned about screen readers, ARIA attributes, the HTML5 hidden attribute, and more! It's imp
cloudfour.com
'퍼블리싱 > CSS' 카테고리의 다른 글
[css] 포토샵 drop shadow를 css로 표현하기 ( feat. xd로 css 코드 보기 ) (0) | 2021.11.25 |
---|---|
[css] 반응형 웹을 위한 media query / 실무에서 느낀 점 (0) | 2021.09.08 |
[css] BEM - Block Element Modifier : css naming convention (0) | 2021.07.28 |
[css] rem 의 정의와 사용법, 픽셀보다 권장하는 이유 (0) | 2021.07.27 |
[css] margin과 padding 적재적소에 사용하는 법 (feat. margin-collapsing 마진병합현상/마진상쇄현상) (0) | 2021.07.20 |