@@ -939,15 +939,17 @@ export class MgtPerson extends MgtTemplatedTaskComponent {
939939 // Render the line1 template
940940 const template = this . renderTemplate ( 'line1' , { person } ) ;
941941 details . push ( html `
942- <div class="line1" part="detail-line" @click=${ ( ) =>
943- this . handleLine1Clicked ( ) } role="presentation" aria-label="${ line1text } ">${ template } </div>
942+ <div class="line1" part="detail-line" @click=${ ( ) => this . handleLine1Clicked ( ) }
943+ @keydown=${ ( e : KeyboardEvent ) => e . key === 'Enter' && this . handleLine1Clicked ( ) }
944+ role="presentation" aria-label="${ line1text } ">${ template } </div>
944945 ` ) ;
945946 } else {
946947 // Render the line1 property value
947948 if ( line1text ) {
948949 details . push ( html `
949- <div class="line1" part="detail-line" @click=${ ( ) =>
950- this . handleLine1Clicked ( ) } role="presentation" aria-label="${ line1text } ">${ line1text } </div>
950+ <div class="line1" part="detail-line" @click=${ ( ) => this . handleLine1Clicked ( ) }
951+ @keydown=${ ( e : KeyboardEvent ) => e . key === 'Enter' && this . handleLine1Clicked ( ) }
952+ role="presentation" aria-label="${ line1text } ">${ line1text } </div>
951953 ` ) ;
952954 }
953955 }
@@ -959,15 +961,17 @@ export class MgtPerson extends MgtTemplatedTaskComponent {
959961 // Render the line2 template
960962 const template = this . renderTemplate ( 'line2' , { person } ) ;
961963 details . push ( html `
962- <div class="line2" part="detail-line" @click=${ ( ) =>
963- this . handleLine2Clicked ( ) } role="presentation" aria-label="${ text } ">${ template } </div>
964+ <div class="line2" part="detail-line" @click=${ ( ) => this . handleLine2Clicked ( ) }
965+ @keydown=${ ( e : KeyboardEvent ) => e . key === 'Enter' && this . handleLine2Clicked ( ) }
966+ role="presentation" aria-label="${ text } ">${ template } </div>
964967 ` ) ;
965968 } else {
966969 // Render the line2 property value
967970 if ( text ) {
968971 details . push ( html `
969- <div class="line2" part="detail-line" @click=${ ( ) =>
970- this . handleLine2Clicked ( ) } role="presentation" aria-label="${ text } ">${ text } </div>
972+ <div class="line2" part="detail-line" @click=${ ( ) => this . handleLine2Clicked ( ) }
973+ @keydown=${ ( e : KeyboardEvent ) => e . key === 'Enter' && this . handleLine2Clicked ( ) }
974+ role="presentation" aria-label="${ text } ">${ text } </div>
971975 ` ) ;
972976 }
973977 }
@@ -980,15 +984,17 @@ export class MgtPerson extends MgtTemplatedTaskComponent {
980984 // Render the line3 template
981985 const template = this . renderTemplate ( 'line3' , { person } ) ;
982986 details . push ( html `
983- <div class="line3" part="detail-line" @click=${ ( ) =>
984- this . handleLine3Clicked ( ) } role="presentation" aria-label="${ text } ">${ template } </div>
987+ <div class="line3" part="detail-line" @click=${ ( ) => this . handleLine3Clicked ( ) }
988+ @keydown=${ ( e : KeyboardEvent ) => e . key === 'Enter' && this . handleLine3Clicked ( ) }
989+ role="presentation" aria-label="${ text } ">${ template } </div>
985990 ` ) ;
986991 } else {
987992 // Render the line3 property value
988993 if ( text ) {
989994 details . push ( html `
990- <div class="line3" part="detail-line" @click=${ ( ) =>
991- this . handleLine3Clicked ( ) } role="presentation" aria-label="${ text } ">${ text } </div>
995+ <div class="line3" part="detail-line" @click=${ ( ) => this . handleLine3Clicked ( ) }
996+ @keydown=${ ( e : KeyboardEvent ) => e . key === 'Enter' && this . handleLine3Clicked ( ) }
997+ role="presentation" aria-label="${ text } ">${ text } </div>
992998 ` ) ;
993999 }
9941000 }
@@ -1001,15 +1007,17 @@ export class MgtPerson extends MgtTemplatedTaskComponent {
10011007 // Render the line4 template
10021008 const template = this . renderTemplate ( 'line4' , { person } ) ;
10031009 details . push ( html `
1004- <div class="line4" part="detail-line" @click=${ ( ) =>
1005- this . handleLine4Clicked ( ) } role="presentation" aria-label="${ text } ">${ template } </div>
1010+ <div class="line4" part="detail-line" @click=${ ( ) => this . handleLine4Clicked ( ) }
1011+ @keydown=${ ( e : KeyboardEvent ) => e . key === 'Enter' && this . handleLine4Clicked ( ) }
1012+ role="presentation" aria-label="${ text } ">${ template } </div>
10061013 ` ) ;
10071014 } else {
10081015 // Render the line4 property value
10091016 if ( text ) {
10101017 details . push ( html `
1011- <div class="line4" part="detail-line" @click=${ ( ) =>
1012- this . handleLine4Clicked ( ) } role="presentation" aria-label="${ text } ">${ text } </div>
1018+ <div class="line4" part="detail-line" @click=${ ( ) => this . handleLine4Clicked ( ) }
1019+ @keydown=${ ( e : KeyboardEvent ) => e . key === 'Enter' && this . handleLine4Clicked ( ) }
1020+ role="presentation" aria-label="${ text } ">${ text } </div>
10131021 ` ) ;
10141022 }
10151023 }
0 commit comments