Catalyzes the initial reaction in O-linked oligosaccharide biosynthesis, the transfer of an N-acetyl-D-galactosamine (GalNAc) residue from UDP-GalNAc to a serine or threonine residue on the protein receptor (By similarity). Generates GalNAc-O-Ser/Thr structure also known as Tn antigen, which itself is immunogenic but also serves as a precursor for the synthesis of different mucin-type O-glycan core structures (By similarity). Contributes to the synthesis of O-linked glycans on mucins and proteoglycans of the central nervous system (By similarity). Can glycosylate both unmodified peptides and glycopeptides that already contain an O-linked GalNAc sugar. Transfers GalNAc to Thr-/Ser-rich tandem repeats GTTPSPVPTTSTTSAP of MUC5AC. Transfers GalNAc to three consecutive serine/threonine residues on SDC3 forming a triplet-Tn epitope expressed in Purkinje cells of the developing brain (By similarity). May promote neurogenesis through glycosylation and stabilization of PDPN (By similarity). L-seryl-[protein] + UDP-N-acetyl-alpha-D-galactosamine = 3-O-[N-acetyl-alpha-D-galactosaminyl]-L-seryl-[protein] + H(+) + UDP L-threonyl-[protein] + UDP-N-acetyl-alpha-D-galactosamine = 3-O-[N-acetyl-alpha-D-galactosaminyl]-L-threonyl-[protein] + H(+) + UDP Protein modification; protein glycosylation. There are two conserved domains in the glycosyltransferase region: the N-terminal domain (domain A, also called GT1 motif), which is probably involved in manganese coordination and substrate binding and the C-terminal domain (domain B, also called Gal/GalNAc-T motif), which is probably involved in catalytic reaction and UDP-Gal binding. The ricin B-type lectin domain binds to GalNAc and contributes to the glycopeptide specificity. Belongs to the glycosyltransferase 2 family. GalNAc-T subfamily.