@@ -525,18 +525,59 @@ class GridsetProcessor extends BaseProcessor {
525525 // Extract scan block number (1-8) for block scanning support
526526 const scanBlock = parseInt ( String ( cell [ '@_ScanBlock' ] || '1' ) , 10 ) ;
527527
528+ // Extract visibility from Grid 3's <Visibility> child element
529+ // Grid 3 stores visibility as a child element, not an attribute
530+ // Valid values: Visible, Hidden, Disabled, PointerAndTouchOnly, TouchOnly, PointerOnly
531+ const grid3Visibility = cell . Visibility || cell . visibility ;
532+
533+ // Map Grid 3 visibility values to AAC standard values
534+ // Grid 3 can have additional values like TouchOnly, PointerOnly that map to PointerAndTouchOnly
535+ let cellVisibility : 'Visible' | 'Hidden' | 'Disabled' | 'PointerAndTouchOnly' | 'Empty' | undefined ;
536+ if ( grid3Visibility ) {
537+ const vis = String ( grid3Visibility ) ;
538+ // Direct mapping for standard values
539+ if ( vis === 'Visible' || vis === 'Hidden' || vis === 'Disabled' || vis === 'PointerAndTouchOnly' ) {
540+ cellVisibility = vis ;
541+ }
542+ // Map Grid 3 specific values to AAC standard
543+ else if ( vis === 'TouchOnly' || vis === 'PointerOnly' ) {
544+ cellVisibility = 'PointerAndTouchOnly' ;
545+ }
546+ // Grid 3 may use 'Empty' for cells that exist but have no content
547+ else if ( vis === 'Empty' ) {
548+ cellVisibility = 'Empty' ;
549+ }
550+ // Unknown visibility - default to Visible
551+ else {
552+ cellVisibility = undefined ; // Let it default
553+ }
554+ }
555+
528556 // Extract label from CaptionAndImage/Caption
529557 const content = cell . Content ;
530558 const captionAndImage = content . CaptionAndImage || content . captionAndImage ;
531559 let label = captionAndImage ?. Caption || captionAndImage ?. caption || '' ;
532560
561+ // Check if cell has an image/symbol (needed to decide if we should keep it)
562+ const hasImageCandidate = ! ! (
563+ captionAndImage ?. Image ||
564+ captionAndImage ?. image ||
565+ captionAndImage ?. ImageName ||
566+ captionAndImage ?. imageName ||
567+ captionAndImage ?. Symbol ||
568+ captionAndImage ?. symbol
569+ ) ;
570+
533571 // If no caption, try other sources or create a placeholder
534572 if ( ! label ) {
535- // For cells without captions (like AutoContent cells), create a meaningful label
573+ // For cells without captions, check if they have images/symbols before skipping
536574 if ( content . ContentType === 'AutoContent' ) {
537575 label = `AutoContent_${ idx } ` ;
576+ } else if ( hasImageCandidate || content . ContentType === 'Workspace' || content . ContentType === 'LiveCell' ) {
577+ // Keep cells with images/symbols even if no caption
578+ label = `Cell_${ idx } ` ;
538579 } else {
539- return ; // Skip cells without labels
580+ return ; // Skip cells without labels AND without images/symbols
540581 }
541582 }
542583
@@ -1013,6 +1054,7 @@ class GridsetProcessor extends BaseProcessor {
10131054 pluginMetadata . autoContentType ,
10141055 symbolLibrary : symbolLibraryRef ?. library || undefined ,
10151056 symbolPath : symbolLibraryRef ?. path || undefined ,
1057+ visibility : cellVisibility ,
10161058 style : {
10171059 ...cellStyle ,
10181060 ...inlineStyle , // Inline styles override referenced styles
0 commit comments